[R] Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Wed Jul 10 05:19:13 CEST 2019


Hi Ana,
The first error message may be the critical one. "weight//NA" is
almost certainly not the name of the file you want, and two
consecutive slashes in a path is also incorrect. You may not have
placed the data files in the correct file structure, often a problem
with programs that are written with hard path codings. Without
actually trying to download the data and run the script, that is about
all the assistance I can provide. If you know someone who has
successfully run it, you may be able to get more specific advice.

Jim

On Wed, Jul 10, 2019 at 1:32 AM Ana Marija <sokovic.anamarija using gmail.com> wrote:
>
> Hello,
>
> I am trying to run this program FUSION.assoc_test.R from :
> http://gusevlab.org/projects/fusion/#typical-analysis-and-output
>
> [t.cri.asokovic using cri16in002 fusion_twas-master]$ Rscript FUSION.assoc_test.R
> \
> > --sumstats /gpfs/data/stranger-lab/anamaria/meta_gwas/META_CHR22_1.txt \
> > --weights ./weight/retina.pos \
> > --weights_dir ./weight/ \
> > --ref_ld_chr ./LDREF/1000G.EUR.22 \
> > --chr 22 \
> > --out PGC2.SCZ.22.dat
> Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
> Calls: load -> readChar
> In addition: Warning message:
> In readChar(con, 5L, useBytes = TRUE) :
>   cannot open compressed file './weight//NA', probable reason 'No such file
> or directory'
> Execution halted
>
> I also formatted my retina.pos to be the same as in the given example (the
> example does run for me)
>
> WGT     ID      CHR     P0      P1
> retina/retina.ENSG00000000419.wgt.RDat  DPM1    chr20   50934867
>  50958555
> retina/retina.ENSG00000000457.wgt.RDat  SCYL3   chr1    169849631
> 169894267
> retina/retina.ENSG00000000460.wgt.RDat  C1orf112        chr1    169662007
>     169854080
> retina/retina.ENSG00000000938.wgt.RDat  FGR     chr1    27612064
>  27635277
> retina/retina.ENSG00000000971.wgt.RDat  CFH     chr1    196651878
> 196747504
>
>
> [t.cri.asokovic using cri16in002 weight]$ ls
> retina  retina.pos
> [t.cri.asokovic using cri16in002 weight]$ pwd
> /gpfs/data/stranger-lab/anamaria/fusion/fusion_twas-master/weight
>
> in retina folder I have all .RDat files
>
> Does anyone know what is the issue here? It is impossible to get an answer
> from the developer.
>
> Thanks
> Ana
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list