wurmlab/genomicscourse

readData fails in popgen practical

Closed this issue · 4 comments

yeban commented

readData function in the popgen practical fails on the new setup with the following error:

|            :            |            :            | 100 %
|==========================Error in setwd(dfile) : cannot change working directory

I have tried passing ./popgenome-vcf as well as absolute path to the function. I also tried moving the VCFs and passing . to the function. None worked.

yeban commented

Also, it is possible to issue setwd in the R console, so it is not a limitation of Rstudio server.

yeban commented

This turned out to be a problem only for the default ubuntu user.

ok - note that we should never use setwd in a script.
instead we should open the script in the right place so that Rstudio automatically knows the right wd

yeban commented

The setwd in this case is in the readData function of PopGenome package.