jdidion / atropos

An NGS read trimming tool that is specific, sensitive, and speedy. (production)
Other
120 stars 15 forks source link

atropos crashes all the time #91

Closed antonkulaga closed 4 years ago

antonkulaga commented 4 years ago

I have constant crashes in atropos (I use latest biocontainers docker), here is the log:

2020-01-26 19:06:03,113 INFO: This is Atropos 1.1.25 with Python 3.7.6
2020-01-26 19:06:03,126 INFO: Loading list of known contaminants from https://raw.githubusercontent.com/jdidion/atropos/master/atropos/adapters/sequencing_adapters.fa
2020-01-26 19:06:03,843 INFO: Trimming 2 adapters with at most 10.0% errors in paired-end mode ...
2020-01-26 19:06:04,346 INFO: Starting 7 worker processes
2020-01-26 19:06:14,174 INFO: Starting 1 worker processes
2020-01-26 19:07:01,377 ERROR: Unexpected error in Worker process 4
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/base.py", line 74, in handle_records
    self.handle_record(context, record)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/base.py", line 127, in handle_record
    return self.handle_reads(context, read1, read2)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/trim/__init__.py", line 52, in handle_reads
    return self.record_handler.handle_record(context, read1, read2)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/trim/__init__.py", line 113, in handle_record
    dest, reads = self.record_handler.handle_record(context, read1, read2)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/trim/__init__.py", line 70, in handle_record
    reads = self.modifiers.modify(read1, read2)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/trim/modifiers.py", line 1099, in modify
    read1, read2 = mods(read1, read2)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/trim/modifiers.py", line 449, in __call__
    self.correct_errors(read1, read2, insert_match, truncate_seqs=True)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/trim/modifiers.py", line 305, in correct_errors
    mean_qual2 = mean([ord(b) for b in r2_qual[r2_start:r2_end]])
  File "/usr/local/lib/python3.7/site-packages/atropos/util/__init__.py", line 563, in mean
    raise ValueError("Cannot determine the mode of an empty sequence")
ValueError: Cannot determine the mode of an empty sequence

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/multicore.py", line 210, in run
    self.pipeline.process_batch(batch)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/multicore.py", line 146, in process_batch
    super().process_batch(batch)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/base.py", line 58, in process_batch
    self.handle_records(context, records)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/trim/__init__.py", line 48, in handle_records
    super().handle_records(context, records)
  File "/usr/local/lib/python3.7/site-packages/atropos/commands/base.py", line 78, in handle_records
    idx, context['index'])) from err
atropos.AtroposError: An error occurred at record 213 of batch 292
jdidion commented 4 years ago

Thanks for reporting this. Please provide a minimally reproducible example, including fastq(s) and the command line.