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

Script fails to finish creating plots #37

Open
avantonder opened this issue Jul 26, 2018 · 9 comments
Open

Script fails to finish creating plots #37

avantonder opened this issue Jul 26, 2018 · 9 comments

Comments

@avantonder
Copy link

Hi,

I'm trying to run MinIONQC.R on some nanopore data I basecalled using albacore (with and without the --barcoding option. The script runs and creates some of the plots and then falls over with the following error:

INFO [2018-07-26 08:17:33] Loading input file: sequencing_summary.txt
INFO [2018-07-26 08:17:53] .: creating output directory:.
INFO [2018-07-26 08:17:53] .: summarising input file for flowcell
INFO [2018-07-26 08:17:54] .: plotting length histogram
INFO [2018-07-26 08:17:59] .: plotting mean Q score histogram
INFO [2018-07-26 08:18:04] .: plotting flowcell overview
INFO [2018-07-26 08:19:01] .: plotting flowcell yield over time
INFO [2018-07-26 08:19:18] .: plotting flowcell yield by read length
INFO [2018-07-26 08:19:31] .: plotting sequence length over time
Error in ans[!test & ok] <- rep(no, length.out = length(ans))[!test & :
replacement has length zero
Calls: single.flowcell ... expand_range4 -> expand_range -> -> f -> ifelse
Execution halted

Thanks,

Andries

@roblanf
Copy link
Owner

roblanf commented Jul 26, 2018

Hi Andries,

If you are able to send me your sequencing_summary.txt file off-list, (or just the first couple of thousand lines is usually enough), I will take a look and see if I can help. It looks to me like there may be some issue with the way my code deals with the time values in your file, but unless I can reproduce the error it's very hard to say much more than that.

Cheers,

Rob

@DeniRibicic
Copy link

DeniRibicic commented Apr 13, 2020

Hi @roblanf,
I am experiencing very similar error to one that @avantonder posted:

INFO [2020-04-13 13:22:27] Loading input file: 0_basecalled/sequencing_summary.txt
INFO [2020-04-13 13:22:32] MinION flowcell detected
INFO [2020-04-13 13:22:34] 0_basecalled: creating output directory:0_MinIONQC/0_basecalled
INFO [2020-04-13 13:22:34] 0_basecalled: summarising input file for flowcell
INFO [2020-04-13 13:22:35] 0_basecalled: plotting length histogram
INFO [2020-04-13 13:22:37] 0_basecalled: plotting mean Q score histogram
INFO [2020-04-13 13:22:38] 0_basecalled: plotting flowcell overview
INFO [2020-04-13 13:22:49] 0_basecalled: plotting flowcell yield over time
INFO [2020-04-13 13:22:52] 0_basecalled: plotting flowcell yield by read length
INFO [2020-04-13 13:22:55] 0_basecalled: plotting sequence length over time
Error in ans[test & ok] <- rep(yes, length.out = length(ans))[test & ok] :
  replacement has length zero
Calls: single.flowcell ... expand_range4 -> expand_range -> <Anonymous> -> f -> ifelse
Execution halted

Please see the sequencing_summary.txt in hope you can figure out where does the code fail.

@roblanf
Copy link
Owner

roblanf commented Apr 14, 2020

Hi @DeniRibicic,

Taking a look now. Will update!

Rob

@roblanf
Copy link
Owner

roblanf commented Apr 14, 2020

@DeniRibicic I couldn't reproduce your error using your input file, which suggests it's a difference in our environments.

Have you updated all the required packages recently? If so, can you paste in as much information as possible on your environment, packge versions, etc?

To update all the relevant packages you can do this:

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

@DeniRibicic
Copy link

@roblanf all the packages were up-to-date, but R was an older version R version 3.5.1 (2018-07-02) -- "Feather Spray"
Updating to recent version solved the problem R version 3.6.3 (2020-02-29) -- "Holding the Windsock".

@roblanf
Copy link
Owner

roblanf commented Apr 14, 2020

Thanks for the update @DeniRibicic. I wish I had any idea at all about what the issue was. I'll leave this open in the hopes that I can recreate it by installing R 3.5.1 first.

@DeniRibicic
Copy link

@roblanf something interesting is happening. When I run the script directly in my shell everything works fine.
However, I have incorporated the MinIONQC.R in my workflow through a bash script and now getting the same error as previously. Would you have any idea why this would happen?

On the side note, I have noticed when activating conda environment in my bash workflows with regular conda activate comand it wouldn't work- maybe it is somehow related?

@roblanf
Copy link
Owner

roblanf commented Apr 20, 2020

Interesting. My bet (and I'm clutching at straws, tbh) is that you're right that these are related.

You could try different ways of calling your bash script, e.g. with -i (suggested here: conda/conda#7980 (comment)), with sh or bash.

What's most odd to me is that whatever is breaking is buried fairly deep down in MinIONQC.R. But I'll give it a shot with a bash script to see if I can recreate the issue. If you can provide any more details on your environment and shell, that might be useful.

@DeniRibicic
Copy link

@roblanf sorry for the late reply. Here is some info:

SHELL=/bin/bash
SSH_CLIENT=10.218.129.55 55285 22
CONDA_SHLVL=1
CONDA_PROMPT_MODIFIER=(base)
LC_NUMERIC=nb_NO.UTF-8
SSH_TTY=/dev/pts/23
CONDA_EXE=/home/denir/anaconda3/bin/conda
DESKTOP_MODE=1
_CE_CONDA=
CONDA_BACKUP_JAVA_HOME=
MAIL=/var/mail/denir
PATH=/home/denir/bin:/home/denir/anaconda3/bin:/home/denir/anaconda3/condabin
CONDA_PREFIX=/home/denir/anaconda3
SHLVL=1
HOME=/home/denir

Ubuntu 16.04

Not sure how helpful is this, but thanks for the effort tho.

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

3 participants