Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems running MinIONQC.R script #59

Open
Laura1129 opened this issue Oct 20, 2022 · 4 comments
Open

Problems running MinIONQC.R script #59

Laura1129 opened this issue Oct 20, 2022 · 4 comments

Comments

@Laura1129
Copy link

Good Morning,

I am experiencing problems in running the minion_qc script in R.
I believe I must be doing something wrong, as I have little experience with R.

This is what I am doing:

  • I installed R and Rstudio in OS(C:) in the Programs folder
  • I downloaded minion_qc-master and put it in the R folder
  • Then, I open the script with Rstudio, then I install the packages:

install.packages(c("data.table",
"futile.logger",
"ggplot2",
"optparse",
"plyr",
"readr",
"reshape2",
"scales",
"viridis",
"yaml"))

  • after that, I try to run the script on the example files with the command:

Rscript MinIONQC.R -i followed by the path/to/sequencing_summary.txt

But the result I always get is: Error: unexpected symbol in "Rscript MinIONQC.R"

Is there something wrong with the directory maybe?

I would really appreciate any kind of help and/or suggestions.

Thank you very much!

Laura

@roblanf
Copy link
Owner

roblanf commented Oct 20, 2022

Hi Laura,

This is a simple one when you know the answer!

Right now you're trying to run MinIONQC from within R. This is not what you should do.

Instead, you should be running it directly from the commandline. On a mac you need to search for the 'terminal' app, and run it from there. On windows one of these options should work: https://www.digitalcitizen.life/run-window-windows-7-why-use-it-anymore/.

Let me know here how you go - I can then update the instructions to be a bit clearer I hope!

Rob

@Laura1129
Copy link
Author

Dear Rob,

thank you very much for your kind answer!

I followed your suggestions and I used Run. This is what I did:

  • I opened Run and then typed in the following path: "C:\Program Files\R\R-4.1.3\minion_qc-master\MinIONQC.R"
  • Then, I selected the option that allowed me to open it with "R for Windows front-end"
  • An Rterm (64-bit) window opened up with this text (which is in Italian):

R version 4.1.3 (2022-03-10) -- "One Push-Up"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R è un software libero ed è rilasciato SENZA ALCUNA GARANZIA.
Siamo ben lieti se potrai redistribuirlo, ma sotto certe condizioni.
Scrivi 'license()' o 'licence()' per maggiori dettagli.

R è un progetto collaborativo con molti contributi esterni.
Scrivi 'contributors()' per maggiori informazioni e 'citation()'
per sapere come citare R o i pacchetti nelle pubblicazioni.

Scrivi 'demo()' per una dimostrazione, 'help()' per la guida
oppure 'help.start()' per la guida nel browser HTML.
Scrivi 'q()' per uscire da R.

And this is what I typed:

getwd()
[1] "C:/Windows/system32"
setwd("C:/Program Files/R/R-4.1.3/minion_qc-master")
getwd()
[1] "C:/Program Files/R/R-4.1.3/minion_qc-master"
install.packages(c("data.table",

  •                "futile.logger",
    
  •                "ggplot2",
    
  •                "optparse",
    
  •                "plyr",
    
  •                "readr",
    
  •                "reshape2",
    
  •                "scales",
    
  •                "viridis",
    
  •                "yaml"))
    

Installazione pacchetti in 'C:/Users/L.S/Documents/R/win-library/4.1'
(perché 'lib' non è specificato)
--- Per piacere, seleziona un mirror CRAN per la sessione ---

The packages were then successfully installed, and this message appeared:
The downloaded binary packages are in
C:\Users\L.S\AppData\Local\Temp\RtmpsbrcWq\downloaded_packages

Then, I typed:

getwd()
[1] "C:/Program Files/R/R-4.1.3/minion_qc-master"
"Rscript MinIONQC.R -i" "C:/Program Files/R/R-4.1.3/minion_qc-master/example_input_minion/RB7_A2/sequencing_summary.txt"
Errore: costante stringa inattesa in ""Rscript MinIONQC.R -i" "C:/Program Files/R/R-4.1.3/minion_qc-master/example_input_minion/RB7_A2/sequencing_summary.txt""

Clearly I must be doing something wrong! Could you please help me identifying where the issues are?

Do I have to try to run the script from the windows command line?

Thank you very much for your patience, have a good day!

Laura

@roblanf
Copy link
Owner

roblanf commented Oct 21, 2022

Hi Laura,

You installed the packages perfectly. After that you need to quit R, and then run MinIONQC from the commandline.

So, go back to Run, and then you'll type something like:

Rscript C:/Program Files/R/R-4.1.3/minion_qc-master/MinIONQC.R -i [input_file]

where the [input_file] is the path to your input file, e.g.

Rscript C:/Program Files/R/R-4.1.3/minion_qc-master/MinIONQC.R -i MinIONQC.R -i" "C:/Program Files/R/R-4.1.3/minion_qc-master/example_input_minion/RB7_A2/sequencing_summary.txt

@Laura1129
Copy link
Author

Hello Robert,

Thank you very much.
I tried again, but with no success. After I enter the windows command prompt and try to run the script from there, it sends me to the R console.
How can I avoid that and keep working in the command prompt?

Also, in my PC I do not have administrator privileges, but still I can run the command prompt as administrator.
Could this create conflict in running the script?

Thank you again for your patience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants