abyzovlab / CNVpytor

a python extension of CNVnator -- a tool for CNV analysis from depth-of-coverage by mapped reads
MIT License
178 stars 26 forks source link

Unable to synchronously flush file #219

Closed FanHongzeng closed 3 months ago

FanHongzeng commented 3 months ago
2024-05-28 08:42:25,981 - cnvpytor.io - INFO - Saving chromosome RD data for chromosome '1'.
Traceback (most recent call last):
  File "/home/fanhongzeng/.local/bin/cnvpytor", line 8, in <module>
    sys.exit(main())
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/cnvpytor/__main__.py", line 280, in main
    app.rd(args.rd, chroms=args.chrom, reference_filename=args.reference_filename)
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/cnvpytor/root.py", line 308, in rd
    self._read_bam(bf, chroms, reference_filename=reference_filename, overwrite=overwrite)
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/cnvpytor/root.py", line 102, in _read_bam
    self.io.save_rd(c[0], r[0], r[1], chromosome_length=c[1])
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/cnvpytor/io.py", line 719, in save_rd
    self.set_chromosome_length(chr_name, chromosome_length)
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/cnvpytor/io.py", line 1008, in set_chromosome_length
    self.create_signal(None, None, "chromosome lengths",
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/cnvpytor/io.py", line 420, in create_signal
    self._flush()
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/cnvpytor/io.py", line 505, in _flush
    self.file.flush()
  File "/home/fanhongzeng/.local/lib/python3.10/site-packages/h5py/_hl/files.py", line 590, in flush
    h5f.flush(self.id)
  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 159, in h5py.h5f.flush
RuntimeError: Unable to synchronously flush file (file write failed: time = Tue May 28 08:42:26 2024
, filename = 'test.pytor', file descriptor = 4, errno = 5, error message = 'Input/output error', buf = 0x5631f01fc808, total write size = 96, bytes this sub-write = 96, bytes actually written = 18446744073709551615, offset = 0)
Traceback (most recent call last):
  File "h5py/_objects.pyx", line 201, in h5py._objects.ObjectID.__dealloc__
RuntimeError: Can't decrement id ref count (unable to close file, errno = 5, error message = 'Input/output error')
Exception ignored in: 'h5py._objects.ObjectID.__dealloc__'
Traceback (most recent call last):
  File "h5py/_objects.pyx", line 201, in h5py._objects.ObjectID.__dealloc__
RuntimeError: Can't decrement id ref count (unable to close file, errno = 5, error message = 'Input/output error')
arpanda commented 3 months ago

It looks like you're having an issue with saving the results. Could you please check if you have read/write permissions for the specified output path?