Skip to content
Prev 5174 / 21312 Next

[Bioc-devel] Problem running Perl script with R-devel

Hi Henrik,

Thanks for your feedback.

No matter what, I will implement suggestion #3 in the next version of COHCAP.  I agree that is important.

Best,
Charles

-----Original Message-----
From: henrik.bengtsson at gmail.com [mailto:henrik.bengtsson at gmail.com] On Behalf Of Henrik Bengtsson
Sent: Monday, January 27, 2014 12:38 PM
To: Warden, Charles
Cc: Dan Tenenbaum; bioc-devel at r-project.org
Subject: Re: [Bioc-devel] Problem running Perl script with R-devel

Some quick ideas:

1. Before making the full call, call res <- system2(perlbin, "-v") to
assert no errors about running Perl itself.  If an error, catch it and
given an information message ("Failed to run 'perl -v'" or something).
That will be user friendly as well for future users who run into
troubles.

2. Before calling system(), you can also assert that the script and
the input files are accessible, cf. file_test("-f") and file.access().
 If not, give an informative error message.

3. Do res <- system(cmd, intern=TRUE, wait=TRUE) and report on 'res'
when there's an error.  It will show the output of your Perl session.

4. You can use x <- normalizePath(x) to create OS-consistent paths/pathnames.

My $.02

/Henrik
On Mon, Jan 27, 2014 at 10:56 AM, Warden, Charles <cwarden at coh.org> wrote: