This file is indexed.

/usr/include/GNUstep/Frameworks/BioCocoa.framework/Versions/2/BCSequence.h is in libbiococoa-dev 2.2.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
//
//  BCSequence.h
//  BioCocoa
//
//  Created by Koen van der Drift on 12/14/2004.
//  Copyright (c) 2003-2009 The BioCocoa Project.
//  All rights reserved.
//
//  Redistribution and use in source and binary forms, with or without
//  modification, are permitted provided that the following conditions
//  are met:
//  1. Redistributions of source code must retain the above copyright
//  notice, this list of conditions and the following disclaimer.
//  2. Redistributions in binary form must reproduce the above copyright
//  notice, this list of conditions and the following disclaimer in the
//  documentation and/or other materials provided with the distribution.
//  3. The name of the author may not be used to endorse or promote products
//  derived from this software without specific prior written permission.
//
//  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
//  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
//  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
//  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
//  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
//  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
//  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
//  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
//  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

/*!
@header
@abstract Provides in-memory representations of biological sequence (DNA, protein, etc.).
*/

#import <Foundation/Foundation.h>
#import "BCFoundationDefines.h"

@class BCSymbol;
@class BCSymbolSet;
@class BCAnnotation;


/*!
    @class      BCSequence
    @abstract   Class that holds a biological sequence (DNA, protein, etc.)
    @discussion This class is used for all types of sequences. The sequence type
	* is determined by the symbolset, which defines the BCSymbols that are allowed
	* to be in the sequence. Compare this to NSString, where the encoding determines the
	* type of string that is inside the NSString object.
*/

@interface BCSequence : NSObject <NSCopying>
{
	NSData				*sequenceData;		// holds a char array with the sequence string
	BCSymbolSet			*symbolSet;			// determines the BCSymbols that can be in this sequence
    NSArray				*symbolArray;		// array of BCSymbol objects to represent the sequence
	NSMutableDictionary	*annotations;		// annotations fot this sequence
	BCSequenceType		sequenceType;		// defines the sequence type 
}


#if 0
#pragma mark == INITIALIZATION METHODS ==
#endif


/*!
@method      initWithSymbolArray:symbolSet:
 @abstract   initializes a BCSequence object by passing it an NSArray of BCSymbol.
 @discussion
 * The method scans the passed array for all BCSymbol objects, and creates
 * a new BCSequence using them. The symbol set is used to filter the passed symbols.
 * The symbol set instance should be the same sequence type as the sequence, e.g. should
 * contain DNA symbols if used to initialize a DNA sequence. If not the right sequence type,
 * or if the symbolSet is nil, then the implementation guesses the most likely
 * symbolSet based on the symbols in the array.
 */
- (id)initWithSymbolArray:(NSArray *)anArray symbolSet:(BCSymbolSet *)aSet;

/*!
@method      initWithData:symbolSet:
 @abstract   initializes a BCSequence object by passing it an NSData of symbols.
 @discussion
 * The method scans the passed data for all BCSymbol objects, and creates
 * a new BCSequence using them. The symbol set is used to filter the passed symbols.
 * The symbol set instance should be the same sequence type as the sequence, e.g. should
 * contain DNA symbols if used to initialize a DNA sequence. If not the right sequence type,
 * or if the symbolSet is nil, then the implementation guesses the most likely
 * symbolSet based on the symbols in the array.
 */
- (id)initWithData:(NSData *)aData symbolSet:(BCSymbolSet *)aSet;


/*!
@method      initWithSymbolArray:
 @abstract   initializes a BCSequence object by passing it an NSArray of BCSymbol.
 @discussion This method calls '-initWithSymbolArray:symbolSet'
 * using the default symbol set for the class.
 * The method scans the passed array for all BCSymbol objects compatible with the
 * type of sequence being created.
 */
- (id)initWithSymbolArray:(NSArray *)anArray;


/*!
@method      initWithString:symbolSet:
 @abstract   initializes a BCSequence object by passing it an NSString.
 @discussion This is the designated initializer.
 * This method will attempt to create an array of BCSymbols using the
 * characters found in the string.
 * The BCSymbols created will depend on the symbol set passed as argument.
*/
- (id)initWithString:(NSString *)aString symbolSet:(BCSymbolSet *)aSet;


/*!
    @method     initWithString:
 @abstract   initializes a BCSequence object by passing it an NSString.
 @discussion This method calls initWithString:symbolSet:
 * using the default symbol set of the class as argument.
 * The method should only be called on a concrete subclass.
 * This method will create an array of BCSymbols using the
 * characters found in the string. The type of BCSymbols created
 * will depend on the the sequence type, e.g. a DNA sequence
 * will only use DNA bases.
*/
- (id)initWithString:(NSString*)aString;


/*!
    @method     initWithString:range:
    @abstract   initializes a BCSequence object by passing it an NSString and a range.
    @discussion This method calls '-initWithString:'. Note that the range is 0-based.
*/
- (id)initWithString:(NSString*)aString range:(NSRange)aRange;

/*!
	@method     initWithString:symbolSet:
	@abstract   initializes sequence object with the string passed as argument
	@discussion This method calls 'initWithString:symbolSet:'.
 */
- (id)initWithString:(NSString*)aString range:(NSRange)aRange symbolSet:(BCSymbolSet *)aSet;

/*!
	@method     initWithThreeLetterString:symbolSet:
	@abstract   initializes sequence object with a three-letter code string passed as argument
*/
- (id)initWithThreeLetterString:(NSString*)aString symbolSet:(BCSymbolSet *)aSet;

/*!
    @method     sequenceWithString:
	@abstract   creates and returns an autoreleased sequence object initialized with the string passed as argument
	@discussion This method calls 'initWithString:'
*/
+ (BCSequence *)sequenceWithString:(NSString *)aString;

/*!
	@method     sequenceWithString:symbolSet:
	@abstract   creates and returns an autoreleased sequence object initialized with the string passed as argument
	@discussion This method calls 'initWithString:symbolSet:'.
 */
+ (BCSequence *)sequenceWithString:(NSString *)aString symbolSet:(BCSymbolSet *)aSet;

/*!
	@method     sequenceWithThreeLetterString:symbolSet:
	@abstract   creates and returns an autoreleased sequence object initialized with a three-letter code string passed as argument
	@discussion This method calls 'initWithString:symbolSet:'.
*/
+ (BCSequence *)sequenceWithThreeLetterString:(NSString *)aString symbolSet:(BCSymbolSet *)aSet;

	/*!
    @method     sequenceWithSymbolArray:
    @abstract   creates and returns an autoreleased sequence object initialized with the array of BCSymbols passed as argument
	@discussion This method calls 'initWithSymbolArray:'
*/
+ (BCSequence *)sequenceWithSymbolArray:(NSArray *)entry;

/*!
    @method     sequenceWithSymbolArray:
    @abstract   creates and returns an autoreleased sequence object initialized with the array of BCSymbols passed as argument
	@discussion This method calls 'initWithSymbolArray:symbolSet'
*/
+ (BCSequence *)sequenceWithSymbolArray:(NSArray *)entry symbolSet: (BCSymbolSet *)aSet;

/*!
    @method     objectForSavedRepresentation:
    @abstract   Returns a BCSequence object representing the sequence submitted 
    @discussion all BC classes should implement a "savableRepresentation" and an 
    *  "objectForSavedRepresentation" method to allow archiving/uncarchiving in
    *  .plist formatted files.
*/
+ (BCSequence *)objectForSavedRepresentation:(NSString *)sequence;

/*!
    @method    convertThreeLetterStringToOneLetterString:symbolSet:
	@abstract  Converts a 3-letter code string to a 1-letter code string 
*/
- (NSString *)convertThreeLetterStringToOneLetterString:(NSString *)aString symbolSet: (BCSymbolSet *)aSet;


#if 0
#pragma mark == SEQUENCE TYPE DETERMINATION ==
#endif


/*!
    @method     sequenceTypeForString:
	@abstract   Returns the guessed sequence type of an arbitrary string.
*/
- (BCSequenceType)sequenceTypeForString:(NSString *)string;

/*!
    @method     sequenceTypeForData:
	@abstract   Returns the guessed sequence type from sequence data.
*/
- (BCSequenceType)sequenceTypeForData:(NSData *)aData;

/*!
    @method     sequenceTypeForSymbolArray:
	@abstract   Returns the guessed sequence type of an array of BCSymbols.
*/
- (BCSequenceType)sequenceTypeForSymbolArray:(NSArray *)anArray;



#if 0
#pragma mark == OBTAINING SEQUENCE INFORMATION ==
#endif


/*!
    @method     sequenceData
    @abstract   returns and NSData object containing the sequenceData
*/
- (NSData *) sequenceData;


/*!
    @method     bytes;
    @abstract   returns the raw bytes representing the sequence
*/
- (const unsigned char *) bytes;


/*!
    @method     symbolSet
    @abstract   returns the symbolSet associated with this sequence
*/
- (BCSymbolSet *) symbolSet;

/*!
	@method     setSymbolSet:
	@abstract   sets the symbolSet associated with this sequence
*/
- (void) setSymbolSet:(BCSymbolSet *)symbolSet;



/*!
    @method     sequenceType
    @abstract   returns the type of sequence
*/
- (BCSequenceType) sequenceType;


/*!
@method     length
@abstract   returns the length of the sequence
*/
- (unsigned int) length;


/*!
    @method     symbolAtIndex:
    @abstract   returns the BCSymbol object at index.  Returns nil if index is out of bounds.
*/
- (BCSymbol *)symbolAtIndex: (int)theIndex;




/*!
    @method     containsAmbiguousSymbols
    @abstract   determines whether any symbols in the sequence are compound symbols.
*/
- (BOOL) containsAmbiguousSymbols;


/*!
    @method     sequenceString
    @abstract   returns the sequence string of the object.
    @discussion returns an NSString containing a one letter-code string of the sequence.
	* This method is useful when the sequence needs to be displayed in a view.
*/
- (NSString*)sequenceString;


/*!
    @method    symbolArray
      @abstract   returns a ponter to the array of BCSymbol objects that make up the sequence.
      @discussion The array returned is the object used internally by BCSequence.
	  * The array obtained should only be used for reading, and should not be modified by the caller.	 
      * To modify the sequence, instead use one of the
	  * convenience methods setSymbolArray, removeSymbolsInRange, removeSymbolsAtIndex,
	  * or insertSymbolsFromSequence:atIndex. 
*/
- (NSArray *)symbolArray;


/*!
    @method    clearSymbolArray
    @abstract   clears the symbol array
    @discussion Removes all symbols from the symbol array and sets the array to nil.
    *   Call this method first to re-generate the symbolArray after the sequence has been modified.
*/
- (void)clearSymbolArray;

/*!
    @method    subSequenceStringInRange:
    @abstract   returns a subsequence in string form
    @discussion returns an NSString containing a subsequence specified by aRange (0-based).
    *   Returns nil if any part of aRange is out of bounds.
*/
- (NSString *)subSequenceStringInRange:(NSRange)aRange;

/*!
    @method    sequenceStringFromSymbolArray:
    @abstract   returns an NSString representation of a symbolArray
*/
- (NSString *)sequenceStringFromSymbolArray:(NSArray *)anArray;

/*!
    @method    subSymbolArrayInRange:
    @abstract   returns a sub-symbolarray form
    @discussion returns an NSArray containing a subsequence specified by aRange (0-based).
    *   Returns nil if any part of aRange is out of bounds.
*/
- (NSArray *)subSymbolArrayInRange:(NSRange)aRange;

/*!
    @method    subSequenceInRange:
    @abstract   returns a sub-symbollist
    @discussion returns an BCSequence containing a sub-symbollist specified by aRange (0-based).
    *   Returns nil if any part of aRange is out of bounds.
*/
- (BCSequence *)subSequenceInRange:(NSRange)aRange;


/*!
     @method     savableRepresentation
     @abstract   Returns the sequenceString for saving.
     @discussion All BCSymbol classes implement this method to provide a standard way of
     *  accessing their data in a format that can be stored in Apple .plist files within
     *  arrays or dictionaries.
*/
- (NSString *) savableRepresentation;


/*!
     @method     description
     @abstract   Overrides NSObject's description - describes the object in string form
     @discussion In the default implementation, returns the sequence string.  Useful primarily
     *  for debugging.
*/
- (NSString *) description;

/*!
    @method     addAnnotation:
    @abstract   Add a BCAnnotation object to the annotations dictionary
*/

- (void) addAnnotation:(BCAnnotation *)annotation;
/*!
    @method     addAnnotation:forKey:
    @abstract   Add an annotation to the annotations dictionary
    @discussion Using two strings for the key and value, this method adds an annotation
*/
- (void) addAnnotation:(NSString *)annotation forKey: (NSString *) key;

/*!
    @method     annotationForKey:
    @abstract   Get the annpotation for a specific key
    @discussion Returns the annotation for a given key, which is passed as an NSString
*/
- (id) annotationForKey: (NSString *) key;

/*!
    @method      annotations
    @abstract   Returns the annotations dictionary
*/
- (NSMutableDictionary *) annotations;

/*!
    @method     setAnnotations:
    @abstract   Set the annotations dictionary
    @discussion This will completely replace the current annotations dictaionry. All key-value pairs will be lost
	* and replaced by those in the new dictionary.
*/
//- (void)setAnnotations:(NSMutableDictionary *)aDict;


#if 0
#pragma mark == MANIPULATING THE SEQUENCE ==
#endif


/*!
    @method    setSymbolArray:
    @abstract   sets the symbollist as an array of BCSymbol objects.
*/
- (void)setSymbolArray:(NSArray *)anArray;


/*!
    @method   removeSymbolsInRange:
    @abstract   deletes a sub-symbollist.
    @discussion deletes the BCSymbols in the sub-symbollist specified by aRange (0-based).
*/
- (void)removeSymbolsInRange:(NSRange)aRange;


/*!
    @method   removeSymbolAtIndex:
    @abstract   deletes one symbol.
    @discussion deletes a BCSymbol located at index (0-based).
*/
- (void)removeSymbolAtIndex:(int)index;


/*!
    @method   insertSymbolsFromSequence:atIndex:
    @abstract   inserts a BCSequence into the current symbolarray, starting at index (0-based)
    @discussion inserts the BCSequence that is in the first argument in the current BCSequence.
*/
- (void)insertSymbolsFromSequence:(BCSequence *)seq atIndex:(int)index;



#if 0
#pragma mark == DERIVING RELATED SEQUENCES ==
#endif


/*!
    @method     reverse
	@abstract   returns a BCSequence that is the reverse of the one queried.
*/
- (BCSequence *) reverse;


/*!
    @method     complement
	@abstract   returns a BCSequence that is the complement of the one queried.
    @discussion This is a convenience method that calls BCToolComplement.
*/
- (BCSequence *) complement;


/*!
    @method     reverseComplement
	@abstract   returns a BCSequence that is the reverse complement of the one queried.
    @discussion This is a convenience method that calls BCToolComplement.
*/
- (BCSequence *) reverseComplement;


#if 0
#pragma mark == FINDING SUBSEQUENCES ==
#endif


- (NSArray *) findSequence: (BCSequence *) entry;
- (NSArray *) findSequence: (BCSequence *) entry usingStrict: (BOOL) strict;
- (NSArray *) findSequence: (BCSequence *) entry usingStrict: (BOOL) strict firstOnly: (BOOL) firstOnly;
- (NSArray *) findSequence: (BCSequence *) entry usingStrict: (BOOL) strict firstOnly: (BOOL) firstOnly usingSearchRange: (NSRange) range;

@end