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

'event_l' referenced before assignment #200

Closed
peaceben opened this issue Apr 4, 2022 · 4 comments
Closed

'event_l' referenced before assignment #200

peaceben opened this issue Apr 4, 2022 · 4 comments

Comments

@peaceben
Copy link

peaceben commented Apr 4, 2022

Hi,

when i run the Nextflow-based preprocessing pipeline on a minimal test data set (WT and IVT control, 1 rep each, 1 reference gene, but high coverage), it terminates with following error at eventalign_collapse: "'event_l' referenced before assignment".

Same behaviour locally and on awsbatch. Could this be due to the input data?

Best,
Ben

Here is the log:

executor > awsbatch (9)
[5f/85029e] process > guppy (1) [100%] 2 of 2 ✔
[e2/7fba58] process > pycoQC (2) [100%] 2 of 2 ✔
[4b/d59f62] process > index_transcriptome (1) [100%] 1 of 1 ✔
[b0/550cd7] process > minimap (2) [100%] 2 of 2 ✔
[30/64e082] process > eventalign (1) [ 50%] 1 of 2, failed: 1
[- ] process > nanocompore -
Error executing process > 'eventalign (1)'

Caused by:
Process eventalign (1) terminated with an error exit status (1)

Command executed:

cat guppy/pass/*.fastq > basecalled.fastq
f5c index -t 3 -d 'raw_data' basecalled.fastq
f5c eventalign -t 3 -r basecalled.fastq -b minimap.filt.sort.bam -g reference_psba.fa --samples --print-read-names --scale-events --rna --disable-cuda=yes --min-mapq 0 | tee eventalign.txt | nanocompore eventalign_collapse -t 3 -o eventalign_collapse --log_level debug

Command exit status:
1

Command output:
(empty)

Command error:
[meth_main] - fast5 open time: 0.112 sec
[meth_main] - fast5 read time: 0.637 sec
[meth_main] Data processing time: 0.000 sec
[meth_main] Data output time: 0.000 sec
[meth_main::INFO] Performance bounded by file I/O. File I/O took 1.729 sec than processing
[main] Version: 0.6
[main] CMD: f5c eventalign -t 3 -r basecalled.fastq -b minimap.filt.sort.bam -g reference_psba.fa --samples --print-read-names --scale-events --rna --disable-cuda=yes --min-mapq 0
[main] Real time: 2.035 sec; CPU time: 1.697 sec; Peak RAM: 0.120 GB

2022-03-31T15:00:26.220511+0000 DEBUG - Process-1 | Column names from header: ref_id / read_id / ref_pos / reference_kmer / model_kmer / dwell_time / sample_list
2022-03-31T15:00:26.221329+0000 DEBUG - Process-1 | Starting to parse file stdin
2022-03-31T15:00:26.230560+0000 DEBUG - Process-1 | End of file: stdin
2022-03-31T15:00:26.230999+0000 DEBUG - Process-1 | All files done
2022-03-31T15:00:26.231373+0000 DEBUG - Process-1 | Closing file:stdin
2022-03-31T15:00:26.231717+0000 DEBUG - Process-1 | Error in Reader
2022-03-31T15:00:26.233007+0000 ERROR - Process-1 | Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nanocompore/Eventalign_collapse.py", line 174, in __split_reads
in_q.put(event_l)
UnboundLocalError: local variable 'event_l' referenced before assignment

Traceback (most recent call last):
File "/usr/local/bin/nanocompore", line 8, in
2022-03-31T15:00:26.234330+0000 DEBUG - Process-1 | Parsed Reads:0 Events:0
2022-03-31T15:00:26.234335+0000 ERROR - MainProcess | Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nanocompore/Eventalign_collapse.py", line 174, in __split_reads
in_q.put(event_l)
UnboundLocalError: local variable 'event_l' referenced before assignment

2022-03-31T15:00:26.234900+0000 DEBUG - Process-2 | Processed Reads:0 Kmers:0 Events:0 Signals:0
2022-03-31T15:00:26.235127+0000 ERROR - MainProcess | Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nanocompore/Eventalign_collapse.py", line 174, in __split_reads
in_q.put(event_l)
UnboundLocalError: local variable 'event_l' referenced before assignment

2022-03-31T15:00:26.235487+0000 ERROR - MainProcess | An error occured. Killing all processes and closing queues

  sys.exit(main())
File "/usr/local/lib/python3.8/dist-packages/nanocompore/__main__.py", line 175, in main
  args.func(args)
File "/usr/local/lib/python3.8/dist-packages/nanocompore/__main__.py", line 258, in eventalign_collapse_main
  e()
File "/usr/local/lib/python3.8/dist-packages/nanocompore/Eventalign_collapse.py", line 131, in __call__
  raise E
File "/usr/local/lib/python3.8/dist-packages/nanocompore/Eventalign_collapse.py", line 108, in __call__
  raise NanocomporeError(tb)

nanocompore.common.NanocomporeError: Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/nanocompore/Eventalign_collapse.py", line 174, in __split_reads
in_q.put(event_l)
UnboundLocalError: local variable 'event_l' referenced before __assignment

@Wardale24
Copy link

Hi, I would like to add to this issue as I get the same error. Interestingly, I only get this error when processing the IVT dataset, while my WT datasets complete the process with no error.

@lmulroney
Copy link
Collaborator

Peaceben and Wardale,

Sorry for the extremely long delay in responding to this. If you're still using nanopore to evaluate these datasets, could you possibly share the header line of the IVT eventalign file?

Thanks,
Logan

@peaceben
Copy link
Author

Hi Logan,

I gave nanocompore in December another try (different datasets and different computing environment though) and it worked for me locally. Did not try AWS.

Unfortunately, I didn't keep the eventalign files from the previous analysis.

Cheers,
Ben

@lmulroney
Copy link
Collaborator

Thanks for letting me know that it worked for you locally Ben, I'm closing this issue.

Cheers,
Logan

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