avierstr / amplicon_sorter

Sorts amplicons from Nanopore sequencing data based on similarity
31 stars 8 forks source link

Error during access/removal of file_0.todo files #13

Open PlanktonicRelationship opened 1 year ago

PlanktonicRelationship commented 1 year ago

Hi,

We are experiencing error during the processing of file_0.todo. It says "OSError: [Errno 26] Text file busy". We are running in Ubuntu 22.04 virtual box. It seeems the error occurs when Thread-2 is trying to access it. We try changing the number of processes to -np 1 or -np 8 but it still shows the same problem. We also try to change permissions of the file or of the run to super-user but it shows the same problem.

We run the amplicon_sorter.py as such: sudo python3 amplicon_sorter.py -i sample_EukA_S03BC.fastq -o SA_Try4 -min 2300 -max 4300

Full error can be seen here:

Reading sample_EukA_S03BC.fastq
sample_EukA_S03BC.fastq contains 3128 reads.
--> Reading 1241 out of 1241 sequences between 2300 and 4300bp
processing: file_0.todo
Exception in thread Thread-2 (feeder):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/georgia/VMshared/2023Apr27-10Mixed/Basecalled/MinibarT5+Amplicon_Sorter/amplicon_sorter.py", line 567, in feeder
    os.remove(os.path.join(outputfolder, name))
OSError: [Errno 26] Text file busy: '/home/georgia/VMshared/2023Apr27-10Mixed/Basecalled/MinibarT5+Amplicon_Sorter/SA_Try4/sample_EukA_S03BC/file_0.todo'
avierstr commented 1 year ago

My suspicion is that it has something to do with the virtual box. I see you are working in a "VMshared" folder. Can you copy the input file to a folder outside the "VMshared" folder and try again (and also put the output folder outside the VMshared folder) ?

PlanktonicRelationship commented 1 year ago

Thank you, that fixed it!