Thank you so much this indeed solved my issue!
On Sat, Nov 23, 2019 at 3:05 PM Henrik Bengtsson
wrote:
>
> Looking at the https://github.com/eleporcu/TWMR/blob/master/README.txt,
> it looks like you should pass a single argument when you call the MR.R
> script and it should be the name of a gene,
Looking at the https://github.com/eleporcu/TWMR/blob/master/README.txt,
it looks like you should pass a single argument when you call the MR.R
script and it should be the name of a gene, e.g. 'ENSG0154803'.
You are passing two arguments and they look like filenames.
Update the script, because
it is confusing because in documentation they say this is how you run
the script:
https://github.com/eleporcu/TWMR
I tried changing this on the script:
cmd_args=commandArgs(TRUE)
print(cmd_args)
gene<-cmd_args[3]
Ngwas<-239087
N_eQTLs<-32000
out<-c("gene","alpha","SE","P","Nsnps","Ngene")
file<-
Maybe it would help to add:
file<-paste(gene,"matrix",sep=".")
if (!file.exists(file)) stop("File not found: ", file)
filecluster<-read.table(file,header=T,sep=" ",dec=".")
/Henrik
On Sat, Nov 23, 2019 at 11:55 AM Duncan Murdoch
wrote:
>
> On 23/11/2019 1:21 p.m., Ana Marija wrote:
> > Hi Dunca
On 23/11/2019 1:21 p.m., Ana Marija wrote:
Hi Duncan,
thanks, I just did,
Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix
[1] "ENSG0154803.ld" "ENSG0154803.matrix"
Error in file(file, "rt") : cannot open the connection
Calls: read.table -> file
In addition: Warning
Hi Duncan,
thanks, I just did,
Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix
[1] "ENSG0154803.ld" "ENSG0154803.matrix"
Error in file(file, "rt") : cannot open the connection
Calls: read.table -> file
In addition: Warning message:
In file(file, "rt") :
cannot open
On 23/11/2019 11:05 a.m., Ana Marija wrote:
Hi Ben,
I am not sure what you mean when you say to print, is it this?
cmd_args=commandArgs(TRUE)
print(cmd_args)
character(0)
cmd_args=commandArgs()
print(cmd_args)
[1] "/software/linux-el7-x86_64/compilers/r-3.6.1/lib64/R/bin/exec/R"
I changed
Whenever going from working with a data.frame to a matrix, I get annoyed
that I cannot assign and subset at the same time with matrices - like I can
with data.frames.
For example, if I want to add a new column to a data.frame, I can do
something like `myDataFrame[, "newColumn"] <- NA`.
However, w
Hi Ben,
I am not sure what you mean when you say to print, is it this?
> cmd_args=commandArgs(TRUE)
> print(cmd_args)
character(0)
> cmd_args=commandArgs()
> print(cmd_args)
[1] "/software/linux-el7-x86_64/compilers/r-3.6.1/lib64/R/bin/exec/R"
I changed in the first line of this script:
https://
On 23/11/2019 10:26 a.m., Ana Marija wrote:
HI Ben,
I tried it but it doesn't work:
Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix
Error in file(file, "rt") : cannot open the connection
Calls: read.table -> file
In addition: Warning message:
In file(file, "rt") :
cannot ope
HI Ben,
I tried it but it doesn't work:
Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix
Error in file(file, "rt") : cannot open the connection
Calls: read.table -> file
In addition: Warning message:
In file(file, "rt") :
cannot open file '--no-restore.matrix': No such file or d
library and require have new args in 3.6 giving additional control
over conflicts. This seems very useful but I was wondering if there
were some, preferabley simple, way to give existing loaded packages
priority without knowing the actual conflicts in advance. For example
library(dplyr, excl
Hi,
I think you want this order...
Rscript [options for R] script_file.R argument_1 argument_2 ...
So, like this ...
Rscript --no-save MR.R ENSG0154803.ld ENSG0154803.matrix
Cheers,
Ben
On Fri, Nov 22, 2019 at 8:59 PM Ana Marija wrote:
>
> HI Ben,
>
> thank you so much , I did this:
13 matches
Mail list logo