Cannot open file because of connection error
0
0
Entering edit mode
hallie.s • 0
@hallies-16494
Last seen 6.4 years ago

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?

 

 

 

systemArgs chipseq working directory • 841 views
ADD COMMENT

Login before adding your answer.

Traffic: 585 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6