novoalab/nanoRMS

RNA modification stoichiometry estimation using Tombo resquiggling

pabloacera opened this issue · 2 comments

Hi,

I am to running this command:
./get_features.py --rna -f ./cc_yeast_rrna.fa -t 6 -i /home/labuser/lib/nanoRMS-master/per_read/test/guppy3.0.3.hac/RNA235629_WT45C/workspace/batch0.fast5
and it works fine, but when I try the same command with another reference and fast5 of my own I get this error:

[2021-07-04 11:35:59] Processing 1 file(s)... [mem:   108 MB]
Traceback (most recent call last):
  File "./get_features.py", line 394, in <module>
    main()
  File "./get_features.py", line 389, in main
    bamfiles = mod_encode(o.input, o.fasta, o.threads, o.rna, o.sensitive)
  File "./get_features.py", line 350, in mod_encode
    return list(p.starmap(process_fast5, args))    
  File "./get_features.py", line 313, in process_fast5
    tr = get_trace_for_reference_bases(a, res.read, rna) # this takes 189µs (>50%) of time!
  File "./get_features.py", line 247, in get_trace_for_reference_bases
    move_pos = np.append(np.argwhere(move==1).flatten(), len(trace)) # add end of trace
TypeError: object of type 'NoneType' has no len()

When I compare the fast5s I realize that mine does not has these two attributes:
dataset /read_ef2a501b-4935-4424-a003-0b2fdd1165c4/Analyses/Basecall_1D_000/BaseCalled_template/Move
dataset /read_ef2a501b-4935-4424-a003-0b2fdd1165c4/Analyses/Basecall_1D_000/BaseCalled_template/Trace
I think this is causing the error but not sure how to fix it. Do you have any suggestions?
Thanks.

Hi @pabloacera , thanks for the report!

You're right - your Fast5 files indeed miss Move and Trace tables. And those are crucial for our method. I guess those were basecalled by MinKNOW using default settings, right? For the future, you can make MinKNOW to store Move/Trace by changing basecalling options.

I'm afraid you'd need to basecall your Fast5 files again specifying --fast5_out parameter in guppy_basecaller.

I've already added more information regarding this in the documentation and more informative error message.

All the best!

I am afraid I do not see --fast5_out command option in guppy 6.4.2. Please see how we can extract the move and trace file with the current guppy basecaller version.