• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Unix program wrapper problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unix program wrapper problem


  • Subject: Re: Unix program wrapper problem
  • From: Sarven Sabunciyan <email@hidden>
  • Date: Mon, 6 Feb 2006 00:06:26 -0500

Separating the arguments fixed the problem. i.e. instead of using

[blastArgs addObject:@"-p blastn"];

using
[blastArgs addObject:@"-p"];
[blastArgs addObject:@"blastn"];

makes everything work correctly.

Thank you all for all your help.

Regards

Sarven


On Feb 3, 2006, at 4:04 PM, email@hidden wrote:

Here is the problem.  I have a set of unix database searching programs in the
directory:
/Blast/bin

So when I use the command 'cd /Blast/bin'

and then

'/Blast/bin/blastall -p blastn -d ecoli.nt -i test.txt -o out.txt'

The blastall program compares the contents of the file test.txt against the
ecoli.nt database and outputs the results in out.txt (which it creates). There
are absolutely no problems. Note that test.txt and ecoli.nt are in /Blast/bin as well that's why I switch to that directory.


I want to write a wrapper so that I can run the command from a mac app. I am using the code example I found in Cocoa programming. When I try to run the program (code is below) I get the following error:

[NULL_Caption] FATAL ERROR: blast: Unable to open input file  test.txt

I try writing full path names for the database and the input file - didn't work. Any ideas of what I am doing wrong. My code is listed below.

[snip]

	[blastArgs addObject:@"-p blastn"];
	[blastArgs addObject:@"-d ecoli.nt"];
	[blastArgs addObject:@"-i test.txt"];
	[blastArgs addObject:@"-o testout.txt"];
Each of these should be two arguments. What you are doing would be the equivalent of typing this on the command-line:
/Blast/bin/blastall "-p blastn" "-d ecoli.nt" "-i test.txt" "-o out.txt"
Remember that in shells, the space character is the argument delimeter, so every time there is an (unquoted) space you are starting a new argument.


Derrick

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Unix program wrapper problem (From: Derrick Bass <email@hidden>)

  • Prev by Date: Re: Interrogating selectors at runtime
  • Next by Date: RE: Cocoa-dev Digest, Vol 3, Issue 167
  • Previous by thread: Re: Unix program wrapper problem
  • Next by thread: Re: Unix program wrapper problem
  • Index(es):
    • Date
    • Thread