nanoporetech / tombo

Tombo is a suite of tools primarily for the identification of modified nucleotides from raw nanopore sequencing data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while reading Statistic File

AzlanNI opened this issue · comments

Hello Everyone,

I am quite new to using Tombo.

I was using the tool on a Dataset of Mycobac. Data and i am trying to detect the modifications with the alternative and the de novo modell.

So i am using Tombo Version 1.5 and i resquiggled my .fast5 files and used this command to generate the statistic file:

tombo detect_modifications de_novo
--fast5-basedirs /gpfs/project/dilthey/projects/HematoDETECT/MethylationCfDNA/MycoData/Nanoporedata/FBG1/
--statistics-file-basename de_novo_testing_FBG1
--processes 8

It generated the file without any problems. But now i am trying to generate some Output files with the

tombo text_output browser_files and tombo text_output signif_sequence_context command.

These are the command i am trying to use:

tombo text_output signif_sequence_context
--fast5-basedirs /gpfs/project/dilthey/projects/HematoDETECT/MethylationCfDNA/MycoData/Nanoporedata/FBG1/
--statistics-filename /gpfs/project/dilthey/projects/HematoDETECT/MethylationCfDNA/MycoData/Nanoporedata/de_novo_testing_FBG1.tombo.stats
--sequences-filename /gpfs/project/dilthey/projects/HematoDETECT/MethylationCfDNA/MycoData/Refgenome/FBG_v2n.fas

and

tombo text_output signif_sequence_context
--fast5-basedirs /gpfs/project/dilthey/projects/HematoDETECT/MethylationCfDNA/MycoData/Nanoporedata/FBG1/
--statistics-filename /gpfs/project/dilthey/projects/HematoDETECT/MethylationCfDNA/MycoData/Nanoporedata/de_novo_testing_FBG1.tombo.stats
--sequences-filename FBG1_denovo.fasta

So with these two commands i always get the same issue error about the stat file being created in tombo version 1.3 which is not true since i created it with Tombo Version 1.5.

This is the Error:

Loading statistics from file.
Traceback (most recent call last):
File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 2679, in init
self._parse_stats()
File "/software/Tombo/install File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 2565, in _parse_stats
self._fp = h5py.File(self.stats_fn, 'r')
File "/software/Tombo/1.5/login/lib/python3.6/site-packages/h5py/_hl/files.py", line 394, in init
swmr=swmr)
File "/software/Tombo/1.5/login/lib/python3.6/site-packages/h5py/_hl/files.py", line 170, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 85, in h5py.h5f.open
OSError: Unable to open file (bad object header version number)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 3223, in TomboStats
stats = ModelStats(stat_fn)
File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 2684, in init
'was created before Tombo v1.3.1')
tombo.tombo_helper.TomboError: Invalid statistics file provided. Try running tombo/scripts/convert_stats.py if this stats file was created before Tombo v1.3.1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 3135, in init
self._parse_stats()
File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 2565, in _parse_stats
self._fp = h5py.File(self.stats_fn, 'r')
File "/software/Tombo/1.5/login/lib/python3.6/site-packages/h5py/_hl/files.py", line 394, in init
swmr=swmr)
File "/software/Tombo/1.5/login/lib/python3.6/site-packages/h5py/_hl/files.py", line 170, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 85, in h5py.h5f.open
OSError: Unable to open file (bad object header version number)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/software/Tombo/1.5/login/bin/tombo", line 11, in
load_entry_point('ont-tombo', 'console_scripts', 'tombo')()
File "/software/Tombo/install/tombo-1.5/tombo/main.py", line 271, in main
_text_output_commands._write_signif_diff_main(args)
File "/software/Tombo/install/tombo-1.5/tombo/_text_output_commands.py", line 474, in _write_signif_diff_main
args.num_bases, args.statistics_filename)
File "/software/Tombo/install/tombo-1.5/tombo/_text_output_commands.py", line 396, in write_most_signif
plot_intervals = ts.TomboStats(stats_fn).get_most_signif_regions(
File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 3225, in TomboStats
stats = LevelStats(stat_fn)
File "/software/Tombo/install/tombo-1.5/tombo/tombo_stats.py", line 3140, in init
'was created before Tombo v1.3.1')

So now i am stuck and dont know how to continue. It would be great to get some help.

Thanks!

Azlan