// // BCSequenceDNABase.h // BioCocoa // // Created by John Timmer on 8/11/04. // Copyright 2004 John Timmer. All rights reserved. // #import /*! @class BCSequenceDNABase @abstract All DNA bases are handled through this single class @discussion will be forthcoming. */ @interface BCSequenceDNABase : NSObject { NSDictionary *baseInfo; NSString *name; NSString *symbolString; unichar symbol; BOOL isSingleBase; BCSequenceDNABase *complement; NSArray *complements; NSArray *represents; NSArray *representedBy; } //////////////////////////////////////////////////////////////////////////// // CLASS METHODS START HERE #pragma mark â CLASS METHOS //////////////////////////////////////////////////////////////////////////// + (void) initBases; /*! @method baseForSymbol: (unichar)symbol @abstract Returns a BCSequenceDNABase item representing the base submitted */ + (id) baseForSymbol: (unichar)symbol; /*! @method adenosine @abstract Obtains a reference to the single adenosine representation */ + (BCSequenceDNABase *) adenosine; /*! @method thymidine @abstract Obtains a reference to the single thymidine representation */ + (BCSequenceDNABase *) thymidine; /*! @method cytidine @abstract Obtains a reference to the single cytidine representation */ + (BCSequenceDNABase *) cytidine; /*! @method guanidine @abstract Obtains a reference to the single guanidine representation */ + (BCSequenceDNABase *) guanidine; /*! @method anyBase @abstract Obtains a reference to the single N representation */ + (BCSequenceDNABase *) anyBase; + (BCSequenceDNABase *) customBase: (NSString *)baseName; //////////////////////////////////////////////////////////////////////////// // OBJECT METHODS START HERE // #pragma mark â #pragma mark â OBJECT METHODS #pragma mark â #pragma mark âINITIALIZATION METHODS // // INITIALIZATION //////////////////////////////////////////////////////////////////////////// - (BCSequenceDNABase *) initWithDictionary: (NSDictionary *)entry; - (void) initializeBaseRelationships; #pragma mark âBASE INFORMATION METHODS - (NSString *) name; - (unichar) symbol; - (NSString *)symbolString; - (BOOL) isSingleBase; - (NSString *) savableRepresentation; - (NSString *) description; #pragma mark âBASE RELATIONSHIP METHODS /////////////////////////////////////////////////////////// // COMPLEMENTATION METHODS /////////////////////////////////////////////////////////// - (BCSequenceDNABase *)complement; - (NSArray *)complements; - (BOOL) complementsBase: (BCSequenceDNABase *)entry; /////////////////////////////////////////////////////////// // REPRESENTATION METHODS FOR AMBIGUOUS BASES /////////////////////////////////////////////////////////// - (NSArray *) representedBases; - (NSArray *) representingBases; - (BOOL) representsBase: (BCSequenceDNABase *) entry; - (BOOL) isRepresentedByBase: (BCSequenceDNABase *) entry; - (NSCharacterSet *) symbolsOfRepresentedBases; @end