[Biococoa-dev] Annotation

Alexander Griekspoor mek at mekentosj.com
Tue Feb 22 16:57:21 EST 2005


Ok guys, I've completed the BCAnnotation class, next up, implementation 
in BCAbstractSequence and sequencereader. (these classes also have to 
take care of the predefined names. I've temporarily added some code to 
test the new class in the awakeFromNib method of the translation demo. 
It prints out the tests to the console and demos some of the methods...
Cheers,
Alex



On 22-feb-05, at 19:32, Alexander Griekspoor wrote:

>>> I'll have a look at the methods Charles (or John?) was proposing 
>>> with the plists and predefined keys...
>>
>> That was John
> Yep, found the email...
>>
>>> I have two questions already though:
>>> - if we request subsequences, do we add a boolean argument to 
>>> include the annotations? It would mean that we have to include ALL 
>>> position independent annotations, and all the ones that are within 
>>> the range requested?
>>
>> I think we can include that later, but yes, we would have to do that 
>> to be consistent. We may even need to add a new annotation to the 
>> subsequence to keep track of the history of that sequence, using one 
>> of these 'segment' tag you cited in your initial Annotation email.
> Yep, I was thinking that perhaps we should add some method in the 
> sequence class to have it return a unique id or serial number (the 
> famous UUID) so that we can uniquely point to a certain sequence. The 
> segment would be of class BCFeature I guess as it should have the 
> positional properties to which it applies...
> I'm about half way with the basic BCAnnotation class, it will have two 
> properties (or three perhaps depending on how you see it) along the 
> lines of the BSML attribute tag:
> NSString *name, the name of the attribute, also the key with which it 
> is stored in the mutable dictionary
> NSObject *content. the content of the attribute (can be any kind of 
> object)
> NSString *datatype, the classname of the content object (this is not a 
> property but a method)
>
> So for instance an example from the BSML pdf would be the following 
> example:
> <Attribute name="SUBCELLULAR LOCATION" content="CYTOPLASMIC"/>
> which would be come:
> NSString *name	-> @"Subcellular Location"
> NSObject *content	-> @"Cytoplasmic"
> NSString *datatype	-> @"NSString"
>
> The BCFeature would add a range property plus logic for modifying it 
> and helper methods like startposition, endposition etc)
> A segment feature example would then become:
> NSString *name	-> @"Segment"
> NSObject *content	-> @"1921292" <- UUID in this case, or another 
> reference (object) to another sequence, in principle this could even 
> be the segment's  BCSequence object ;-)
> NSString *datatype	-> @"NSString"
> NSRange range	-> NSRange {1212, 12}
>
> The question perhaps rises if we want each annotation to have a set of 
> properties that identify the creator/date etc of the annotation, say 
> the metadata of the annotation.
>
>>> - do we use 1 or 0 based ranges? For the first 10 bases, do I create 
>>> a range {0,10} or {1,10}. I think it would be nicest to use 
>>> NSRanges, we can compensate in the accessors if necessary I guess...
>>
>> The issue of 0 vs 1 is  a problem with cDNAs and the transcription or 
>> translation starting point, or is it a more widely used convention? 
>> One problem with the +1 convention is the absence of 0, IIRC. The 
>> positions goes -2, -1, +1, +2, right?
> Yes, guess so, but those are relative positions, so 0 in that case is 
> the base itself.
>> Anyway, that's a tough question. IMO, we should use a 0 based range 
>> to stick to the Cocoa conventions. In the Cocoa NSRange convention, 
>> the first character of a string is anyway not at position 0 or 1, but 
>> in between the two!
>
> Yep, I would like to have it 0 based as well.... The ranges the 
> findSubsequence methods use are also 0-based right? Guess, that's 
> settled then... Correct me if I'm wrong but I believe BioJava's 
> sequences are 1-based, but Koen might know better.
>
>> Of course,  the BCSequenceView would have to display the correct 
>> numbers, Alex ;-)
> Yeah yeah, LOL I got the message ;-)
> I'll let you know when the BCAnnotation class is in the CVS, ready to 
> burn it down, haha
> Cheers,
> Alex
>
>
>>
>> charles
>>
>> -- 
>> Help science go fast forward:
>> http://cmgm.stanford.edu/~cparnot/xgrid-stanford/
>>
>> Charles Parnot
>> charles.parnot at stanford.edu
>>
>> Room  B157 in Beckman Center
>> 279, Campus Drive
>> Stanford University
>> Stanford, CA 94305 (USA)
>>
>> Tel +1 650 725 7754
>> Fax +1 650 725 8021
>> _______________________________________________
>> Biococoa-dev mailing list
>> Biococoa-dev at bioinformatics.org
>> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>>
>>
> *********************************************************
>                     ** Alexander Griekspoor **
> *********************************************************
>              The Netherlands Cancer Institute
>              Department of Tumorbiology (H4)
>         Plesmanlaan 121, 1066 CX, Amsterdam
>                    Tel:  + 31 20 - 512 2023
>                    Fax:  + 31 20 - 512 2029
>                   AIM: mekentosj at mac.com
>                    E-mail: a.griekspoor at nki.nl
>                Web: http://www.mekentosj.com
>
> 	Claiming that the Macintosh is inferior to Windows
> 	because most people use Windows, is like saying
> 	that all other restaurants serve food that is
> 	inferior to McDonalds
>
> *********************************************************
>
>
> *********************************************************
>                     ** Alexander Griekspoor **
> *********************************************************
>               The Netherlands Cancer Institute
>               Department of Tumorbiology (H4)
>          Plesmanlaan 121, 1066 CX, Amsterdam
>                     Tel:  + 31 20 - 512 2023
>                     Fax:  + 31 20 - 512 2029
>                     AIM: mekentosj at mac.com
>                     E-mail: a.griekspoor at nki.nl
>                 Web: http://www.mekentosj.com
>
> Windows is a 32-bit patch to a 16-bit shell for an 8-bit
> operating system, written for a 4-bit processor by a 2-
> bit company without 1 bit of sense.
>
> *********************************************************
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
>
*********************************************************
                     ** Alexander Griekspoor **
*********************************************************
              The Netherlands Cancer Institute
              Department of Tumorbiology (H4)
         Plesmanlaan 121, 1066 CX, Amsterdam
                    Tel:  + 31 20 - 512 2023
                    Fax:  + 31 20 - 512 2029
                   AIM: mekentosj at mac.com
                    E-mail: a.griekspoor at nki.nl
                Web: http://www.mekentosj.com

	Claiming that the Macintosh is inferior to Windows
	because most people use Windows, is like saying
	that all other restaurants serve food that is
	inferior to McDonalds

*********************************************************




More information about the Biococoa-dev mailing list