avierstr / amplicon_sorter

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

ZeroDivisionError: division by zero #3

Closed fidibidi closed 3 years ago

fidibidi commented 3 years ago

Hello!

Reporting an issue I haven't been able to sort out...

Running on fastq file with following command

python amplicon_sorter.py -i fastq_data/fastq_runid_0b9601a3272fb667a72a79dcb0f4cd0c98b5f38a_0_0.fastq --maxlength 750 --minlength 125 --nprocesses 8 --save_fastq

Chugs along nicely, until we get to:

`fastq_runid_0b9601a3272fb667a72a79dcb0f4cd0c98b5f38a_0_0_24.group----> 0 comparisons to calculate [11/1601] fastq_runid_0b9601a3272fb667a72a79dcb0f4cd0c98b5f38a_0_0_24.group----> no sequences passed criteria --> Number of groups before merge: 0 --> Number of groups after merge: 0 --> Number of groups before merge: 0 --> Number of groups after merge: 0 Writing sequences with high similarity in separate files Process Process-10: Traceback (most recent call last): File "/home/ec2-user/.pyenv/versions/3.6.0/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/home/ec2-user/.pyenv/versions/3.6.0/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "amplicon_sorter.py", line 1093, in sort filter_seq(group_filename, grouplist, indexes) File "amplicon_sorter.py", line 748, in filter_seq

Any suggestions where this issue is arising from?

Thanks!

avierstr commented 3 years ago

Did the script write something in the results.txt file ? The error message suggests there is a group file without any sequences in it. If you open the xxx_0_0_24.group file in a text editor, does it contain any numbers ?

fidibidi commented 3 years ago

Hey!

thanks so much for your response.

I moved the script into the folder with the data files, and that seemed to have sorted out the issue!

Honestly not sure what all changed...