Skip to content
Prev 5169 / 21312 Next

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

Hi Dan,

1) When I first ran the code, the folder didn't exist (it is created from the COHCAP function).  When I run the same set of code in my non-devel version of R (with COHCAP installed via R CMD INSTALL, instead of biocLite), all the files are created properly (in the exact same location)

2)If I set project.folder to tempdir(), then I encounter the same problem.

3) Yes, I wish that the slashes and backslashes were consistent.  I am not actually specifying them directly. Instead, I am using system.path to add the subfolders within project.folder.  In other words, this is the actual code (I was just trying to show you what the text of the command looks like in this specific case):

	temp.stat.file <- file.path(wig.folder, "temp.txt")
	Perl.Path <- file.path(path.package("COHCAP"), "Perl")
	perl.script <- file.path(Perl.Path , "create_wig_files.pl")
	write.table(stat.table, temp.stat.file, quote=F, row.names=F, sep="\t")
	cmd <- paste("perl",perl.script, temp.stat.file, wig.folder, sep=" ")
	system(cmd, intern=TRUE, wait=TRUE)

I hope this clarifies things.  Please let me know if you still have any questions.

Thanks,
Charles

-----Original Message-----
From: Dan Tenenbaum [mailto:dtenenba at fhcrc.org] 
Sent: Monday, January 27, 2014 11:27 AM
To: Warden, Charles
Cc: bioc-devel at r-project.org
Subject: Re: [Bioc-devel] Problem running Perl script with R-devel



----- Original Message -----
Does the directory 
T:\BIC\cwarden\Methylation_Package\Protocol_Exchange\minfi_example/CpG_Site/4
exist prior to running the code? I tried running your code snippet on a directory that didn't exist and got an error (not the same error as you). 

It could be some other issue related to the output directory (perhaps you don't have permission to write to it).

What if you set project.folder to tempdir() and run the code again, does it work?

Dan