avierstr / amplicon_sorter

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

.tmp file not found #5

Closed bugsoundsjc closed 1 year ago

bugsoundsjc commented 2 years ago

Hello, when running amplicon sorter a FileNotFound error for the .tmp file hangs up the run. The .pickle file shows up in the output but no .tmp. I am running amplicon_sorter in Miniconda Python 3.9. Thanks for any ideas about how to proceed!

  File "/opt/miniconda3/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/miniconda3/lib/python3.9/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 586, in similarity
    similarg = args.similar_genes/100
NameError: name 'args' is not defined
Estimating the ssg value for this dataset
Traceback (most recent call last):
  File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 1823, in <module>
    sort_groups()
  File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 1770, in sort_groups
    update_list(tempfile)
  File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 767, in update_list
    estimated_ssg = SSG(tempfile) # estimate ssg value
  File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 618, in SSG
    with open(tempfile, 'r') as tf:
FileNotFoundError: [Errno 2] No such file or directory: 'barcode01_qc12_compare.tmp'
^[[A^[[B^CException ignored in: <module 'threading' from '/opt/miniconda3/lib/python3.9/threading.py'>
Traceback (most recent call last):
  File "/opt/miniconda3/lib/python3.9/threading.py", line 1477, in _shutdown
    lock.acquire()
avierstr commented 2 years ago

my suspicion is that there were not enough similar reads in the inputfile.  What command did you use to run amplicon_sorter ?

On 6/09/2022 23:04, bugsoundsjc wrote:

Hello, when running amplicon sorter a FileNotFound error for the .tmp file hangs up the run. The .pickle file shows up in the output but no .tmp. I am running amplicon_sorter in Miniconda Python 3.9. Thanks for any ideas about how to proceed!

|File "/opt/miniconda3/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/opt/miniconda3/lib/python3.9/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 586, in similarity similarg = args.similar_genes/100 NameError: name 'args' is not defined Estimating the ssg value for this dataset Traceback (most recent call last): File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 1823, in

sort_groups() File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 1770, in sort_groups update_list(tempfile) File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 767, in update_list estimated_ssg = SSG(tempfile) # estimate ssg value File "/Users/jac/amplicon_sorter-master/amplicon_sorter.py", line 618, in SSG with open(tempfile, 'r') as tf: FileNotFoundError: [Errno 2] No such file or directory: 'barcode01_qc12_compare.tmp' ^[[A^[[B^CException ignored in: Traceback (most recent call last): File "/opt/miniconda3/lib/python3.9/threading.py", line 1477, in _shutdown lock.acquire() | —
bugsoundsjc commented 2 years ago

Thanks, that could be the case after checking the read qualities of the ONT data. Tried one amplicon of interest out of a multiplexed dataset to test out the procedure. This was the command: (base) jac@Jeffreys-MBP ~ % python3 /Users/jac/amplicon_sorter-master/amplicon_sorter.py -i /Users/jac/amplicon_sorter-master/barcode01_qc12.fastq -o /Users/jac/amplicon_sorter-master/HUbc01sorted -np 4 -min 750 -max 850 -ra -maxr 1000

avierstr commented 2 years ago

So is it working now with reads of better quality or more reads ?

bugsoundsjc commented 2 years ago

Haven't had a chance to work with it more, I will let you know!

bugsoundsjc commented 1 year ago

Finally tried amplicon sorter again, this time with the sample dataset on Dryad. The same errors above come up, 'args' not defined and a compare.tmp file not found. The .pickle file and outputfolder with a results.txt appear. I'm running amplicon_sorter from a miniconda environment with python 3 that has the dependencies. The read length histogram works fine.

avierstr commented 1 year ago

Did you try again with -maxr 1000 or did you try more reads ?

bugsoundsjc commented 1 year ago

This time I tried -maxr 2000 and 10000 e.g. python3 amplicon_sorter.py -i HAC.fastq -o outputfolder -np 8 -min 650 -max 2850 -maxr 10000

avierstr commented 1 year ago

I still have the suspicion that there are not enough reads sampled that are similar. Do you have a peak in the read length histogram from an abundant amplicon ? If so can you try with a limited range in read length ? Suppose you have a peak at 700 bp: python3 amplicon_sorter.py -i HAC.fastq -o outputfolder -np 8 -min 650 -max 750 -maxr 10000

bugsoundsjc commented 1 year ago

Same result. Might this have to do with my version of Python and dependencies?

bugsoundsjc commented 1 year ago

With a Homebrew install of Python3 and packages on another computer, it now moves past that error and is apparently processing HAC.fastq.

avierstr commented 1 year ago

ok, it means there was something wrong with the python installation on the other computer. Problem solved :-)