command line usage?

Find answers to common questions for CodonCode Aligner and the Aligner License Server

command line usage?

Postby bbimber » Sun Dec 13, 2009 12:12 pm

Hello,

The updates to aligner's scripting have made it much more useful. However, does aligner allow any method to fully automate the execution of aligner scripts via command line? For example, DNAstar allows you to execute a SeqMan script from the command line by adding the script as an argument after the program path. Similar to this:

path_to_seqman\Seqman.exe "path_to_script"

Can or will something similar be possible with aligner?

In aligner, under preferences->startup, you can set a script path to run at start; however, this really isnt a great solution. We're locked into using the same script each time. Technically we could create code that edits the aligner prefs file prior to initiating the job. Alternately, we could always use the same filename for our script file, and just overwrite the previous one prior to initiating the job. The latter would allow only one job to run at a time. in the meantime, we'd look into applescript as a workaround; however, this is platform specific.
bbimber
 
Posts: 2
Joined: Mon Sep 22, 2008 6:51 pm

Re: command line usage?

Postby Peter Richterich » Tue Dec 22, 2009 4:10 pm

Can or will something similar be possible with CodonCode Aligner?

This is already possible in the Windows version of CodonCode Aligner. You can specify the path to the CodonCode Aligner executable, followed by the path to the script file you want to execute. You should enclose each path in quotes to deal with spaces in path names.
This will launch the interactive version of CodonCode Aligner, and execute the script. A few things to note:
  • When run from a command window, control returns right away (not when CodonCode Aligner quits).
  • Any dialogs that are shown during execution will stop the script until a user dismisses the dialog.
  • You can add the "quit" command as the last command in your script file; make sure to save the project first, though, otherwise the "Save project?" dialog will be shown (see above).
On Mac OS X, this approach will not work, since normal Mac applications do not accept command line arguments. The solution of to use AppleScript to tell CodonCode Aligner to activate and to open a script file. Yes, this is system-specific; however, since you specify the path to executables, script files, and probably also data, you will always have different code on Windows and Mac OS X.
Peter Richterich
Site Admin
 
Posts: 100
Joined: Thu Aug 21, 2008 7:23 pm


Return to Support & Questions



Who is online

Users browsing this forum: No registered users and 14 guests

cron