[Biococoa-dev] Alignment & HMM Support in Biococoa

Alexander Griekspoor mek at mekentosj.com
Tue Feb 22 15:52:49 EST 2005

Instead of having to set 100 flags before being able to run the thing, 
it might be a good idea to see if you can discriminate different types 
of task (like ones that have a return value vs ones that only input 
stuff, or vice versa) and see if you can have them in a kind of 
hierarchy. That would allow to create a base BCTaskController with a 
number of more specialized subclasses. Often I like that approach more 
than a one-for-all-with-way-too-many-options approach... Think about 

On 22-feb-05, at 21:46, John Timmer wrote:

>>> Incidentally, I recently wound up building OS-X versions of Muscle 
>>> and
>>> ClustalW.  Now that our sequence object is stabilizing a bit, I was
>>> wondering if people thought it might be worth some effort trying to
>>> write a
>>> generic wrapper that could feed our sequences to command line apps 
>>> and
>>> get a
>>> result back?  This would potentially help us provide a layer of
>>> abstraction
>>> to a large number of Unix tools.
>> Do I understand you correctly that you want to generate a general
>> NSTaskController that does the following:
>> BCSequence -> NSString -> Run Task with arguments -> parse output ->
>> BCSequence or other objects?
> More or less.  Give the user the option of whether to have our 
> existing file
> reading classes try to interpret the output, or to have it returned as 
> a
> string and let them sort it out.
>>> The reason this comes to mind is that I'm finding that a lot of these
>>> things
>>> only take input in a limited number of formats, and we've already got
>>> format
>>> conversion code in place....
>> The real question is how you can make the thing multipurpose instead 
>> of
>> having tens of different controllers for very specific tasks... But 
>> you
>> must have something in mind right?
> Flags - lots and lots of flags.
> The idea is that most of these tools have a limited number of file 
> formats
> they take as input.  Some of them can take input from stdin, others 
> need
> files.  Some output a single file, others multiple files.  We need to 
> give
> the user enough opportunity to work with as many as possible.
> The point of the wrapper would be to do what your initial comment 
> suggested,
> but also automate handling things like creating tmp files as needed, 
> reading
> from the STDOUT and STDERR pipes, handling conversions back to 
> BCSequences,
> cleaning up, sending callback messages, etc.
> Clearly, there are going to be a bunch of user-supplied flags that will
> differ between tasks, but I think a lot of the grunt work could be 
> wrapped,
> so that most tools could be run as something like the following:
> BCTask *myTask;
> [myTask setSequence: mySequnce];
> [myTask setUsesSTDIN: NO];  /// know to use a tmp file
> [myTask setInputFormat: BCFastaFormat];
> [myTask setAdditionalFlags: myFlagArray];
> [myTask setUsesSTDOUT:  NO];  // use a tmp output file
> [myTask setCallBack: @selector(taskDone:contextInfo:) target: self
> contextInfo: nil];
> [myTask setCreatesSequencesFromOutput: YES];
> [myTask setRetainsSTDERRasString: YES];
> [myTask launch];
> _______________________________________________
> This mind intentionally left blank
> _______________________________________________
> 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