[Biococoa-dev] BCSequenceReader

Koen van der Drift kvddrift at earthlink.net
Thu Nov 11 17:13:31 EST 2004


On Nov 11, 2004, at 2:30 AM, Alexander Griekspoor wrote:

>
> Very nice, in fact I'll see if I can further expand that as well soon 
> because this is the part that I'm most interested in on the short 
> term. If that works OK, I'll implement it immediately in the update of 
> EnzymeX.

Before you move on, I think the class should actually return an NSArray 
with BCSequence objects. This is because, as discussed before, some 
file formats can contain more than one sequence.

I also suggest that we for now only focus on the sequence itself. But 
we do need to think of classes to hold features (modifications, helix, 
b-sheet) and annotations (name, author, organism, etc). A possible way 
to do this is to have a class that has an NSDictionary with key-value 
pairs of each feature or annotation. These classes could be members of 
BCSequence. Another option could be to make a new class 
BCSequenceHolder which has a BCSequence member, and optionally a 
BCFeatures and BCAnnotations member. An advantage of the latter 
approach would be that BCSequence's only responsibility is maintaining 
the sequence, all additional information would be in the new classes. 
In that case, BCSequenceReader would return an NSArray of 
BCSequenceHolder objects.


> The best way to do it is to check for the presence of certain 
> characters or look at  overall % of certain characters. Though you can 
> never distinguish a stretch of 7 Alanines from 7 Adenosines I'm 
> afraid.

On the other hand, the user probably knows what the input file 
contains, so why not pass an identifier:

mySequence = [mySequenceReader readFile: file ofType: seqType]

where seqType could be one of the BCSequenceType's or a specific 
BCSymbolSet. (Of course, we could also always return a BCSequence, and 
forget about BCSequenceProtein, BCSequenceDNA, etc ;-)


>
> Finally, one thing we might already think about a bit. The DNA strider 
> format is a binary one, to test this we need to work with paths 
> instead of strings. Therefore, I suggest to pass the path to the 
> readFile method instead of the already read file.

Good idea, we can also pass a url and read from a database.



>
> One minor thing, after updating from CVS I did see the new files of 
> BCSequenceReader, but not in the project. At first I thought this was 
> an XCode thing, but even after a clean checkout they weren't there. 
> Guess you forgot to update the project file as well, could you still 
> do that?
>
>

Talking about cvs, is it possible to remove all the obsolete folders at 
the root level?


- Koen.




More information about the Biococoa-dev mailing list