base1 = r1_seq[i] IndexError: list index out of range
antonkulaga opened this issue · comments
I have the following later with latest master:
atropos.AtroposError: An error occurred at record 569 of batch 1237
2017-10-07 12:47:03,522 ERROR: Unexpected error in Worker process 0
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/atropos-1.1.14+10.g3060182-py3.6-linux-x86_64.egg/atropos/commands/base.py", line 74, in handle_records
self.handle_record(context, record)
File "/usr/local/lib/python3.6/site-packages/atropos-1.1.14+10.g3060182-py3.6-linux-x86_64.egg/atropos/commands/base.py", line 127, in handle_record
return self.handle_reads(context, read1, read2)
File "/usr/local/lib/python3.6/site-packages/atropos-1.1.14+10.g3060182-py3.6-linux-x86_64.egg/atropos/commands/trim/__init__.py", line 52, in handle_reads
return self.record_handler.handle_record(context, read1, read2)
File "/usr/local/lib/python3.6/site-packages/atropos-1.1.14+10.g3060182-py3.6-linux-x86_64.egg/atropos/commands/trim/__init__.py", line 70, in handle_record
reads = self.modifiers.modify(read1, read2)
File "/usr/local/lib/python3.6/site-packages/atropos-1.1.14+10.g3060182-py3.6-linux-x86_64.egg/atropos/commands/trim/modifiers.py", line 1054, in modify
read1, read2 = mods(read1, read2)
File "/usr/local/lib/python3.6/site-packages/atropos-1.1.14+10.g3060182-py3.6-linux-x86_64.egg/atropos/commands/trim/modifiers.py", line 401, in __call__
self.correct_errors(read1, read2, insert_match)
File "/usr/local/lib/python3.6/site-packages/atropos-1.1.14+10.g3060182-py3.6-linux-x86_64.egg/atropos/commands/trim/modifiers.py", line 252, in correct_errors
Here is the command that I run:
atropos trim \
--aligner insert \
-a AGATCGGAAGAGCACACGTCTGAACTCCAGTCACACAGTGATCTCGTATGCCGTCTTCTGCTTG \
-A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT \
-pe1 /cromwell-executions/quality_de_novo/2ce90b41-c1a7-4f7e-b31e-c0ae76ec1cb5/call-atropos_illumina_pe/inputs/pipelines/whales/graywhale/GWliver_S1_L001_R1_001.fastq.gz \
-pe2 /cromwell-executions/quality_de_novo/2ce90b41-c1a7-4f7e-b31e-c0ae76ec1cb5/call-atropos_illumina_pe/inputs/pipelines/whales/graywhale/GWliver_S1_L001_R2_001.fastq.gz \
-o GWliver_S1_L001_R1_001_trimmed.fastq.gz \
-p GWliver_S1_L001_R2_001_trimmed.fastq.gz \
--threads 8 \
--correct-mismatches liberal \
--trim-n
I also have this bug on other files, so it is more likely that it is not a file problem
This is fixed in master and will be in the next release (1.1.15). The problem had to do with an assumption that the reads would be of equal length during error correction, but that is not always the case.
A bug still remains where error correction is not always performed on reads of unequal size - I am opening that separately.