Search
Question: Cannot open file because of connection error
0
gravatar for hallie.s
9 days ago by
hallie.s0
hallie.s0 wrote:

I am following an NGS ChIP-seq tutorial that requires me to set a working directory and use the function systemArgs. I have successfully created my working directory using this code:

> library(systemPipeRdata)
> genWorkenvir(workflow = "chipseq")
[1] "Generated chipseq directory. Next run in chipseq directory, the R code from *.Rmd (*.Rnw) template interactively. Alternatively, workflows can be exectued with a single command as instructed in the vignette."
> setwd("chipseq")

However, when I try to run the chunk of code that includes the function systemArgs, I get an error reading there is no file and R cannot open the connection. Here is my chunk of code and the error I receive:

Code:

```{r}
args <- systemArgs(sysma = "param/trim.param", mytargets = "targets_chip.txt")
filterFct <- function(fq, cutoff = 20, Nexceptions = 0) {
  qcount <- rowSums(as(quality(fq), "matrix") <= cutoff)
  fq[qcount <= Nexceptions]
}
preprocessReads(args = args, Fct = "filterFct(fq, cutoff = 20, Nexceptions = 0)", batchsize = 100000)
writeTargetsout(x = args, file = "targets_chip_trim.txt", overwrite = TRUE)
```

Error:

> args <- systemArgs(sysma = "param/trim.param", mytargets = "targets_chip.txt")
cannot open file 'param/trim.param': No such file or directoryError in file(file, "rt") : cannot open the connection

I guess I am asking: how do I fix this error?

 

 

 

ADD COMMENTlink written 9 days ago by hallie.s0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 254 users visited in the last hour