Closed chAwater closed 2 years ago
A Minimal Working Example:
@test1 AAAAATTTTT
aaaaaaaaaa
split_fastx inputs.fq outputs.fq 5
@test1_chunk0 chunk_length=5 <itertools.chain object at 0x7febfb44ba90>
<itertools.chain object at 0x7febfb44bb38> @test1_chunk1 chunk_length=5 <itertools.chain object at 0x7febfb44bba8>
<itertools.chain object at 0x7febfb44bbe0> @test1_chunk2 chunk_length=5 <itertools.chain object at 0x7febfb44bc50>
<itertools.chain object at 0x7febfb44ba58> @test1_chunk3 chunk_length=5 <itertools.chain object at 0x7febfb44b940>
<itertools.chain object at 0x7febfb44bb70> @test1_chunk4 chunk_length=5 <itertools.chain object at 0x7febfb44bb00>
<itertools.chain object at 0x7febfb44bc18> @test1_chunk5 chunk_length=5 <itertools.chain object at 0x7febfb44bba8>
<itertools.chain object at 0x7febfb44bbe0> @test1_chunk6 chunk_length=5 <itertools.chain object at 0x7febfb44ba90>
<itertools.chain object at 0x7febfb44bb38> @test1_chunk7 chunk_length=5 <itertools.chain object at 0x7febfb44b940>
<itertools.chain object at 0x7febfb44bb70> @test1_chunk8 chunk_length=5 <itertools.chain object at 0x7febfb44bc50>
<itertools.chain object at 0x7febfb44ba58> @test1_chunk9 chunk_length=5 <itertools.chain object at 0x7febfb44bba8>
<itertools.chain object at 0x7febfb44bbe0>
head -n2 inputs.fq | split_fastx - /dev/stdout 5
>test1_chunk0 chunk_length=5 AAAAA >test1_chunk1 chunk_length=5 TTTTT
I think the problem is on https://github.com/nanoporetech/pomoxis/blob/ad462b00de316f5ef0825ccbac0dc45bb85d9989/pomoxis/util.py#L105
that zip two itertools.chain objects.
itertools.chain
Thanks for the report. This should be fixed in v0.3.9
Thanks!
ref: https://github.com/nanoporetech/pomoxis/commit/e23019fc7de9570e83daf74d3f0e14bfc80ceb5e
A Minimal Working Example:
aaaaaaaaaa
<itertools.chain object at 0x7febfb44bb38> @test1_chunk1 chunk_length=5 <itertools.chain object at 0x7febfb44bba8>
<itertools.chain object at 0x7febfb44bbe0> @test1_chunk2 chunk_length=5 <itertools.chain object at 0x7febfb44bc50>
<itertools.chain object at 0x7febfb44ba58> @test1_chunk3 chunk_length=5 <itertools.chain object at 0x7febfb44b940>
<itertools.chain object at 0x7febfb44bb70> @test1_chunk4 chunk_length=5 <itertools.chain object at 0x7febfb44bb00>
<itertools.chain object at 0x7febfb44bc18> @test1_chunk5 chunk_length=5 <itertools.chain object at 0x7febfb44bba8>
<itertools.chain object at 0x7febfb44bbe0> @test1_chunk6 chunk_length=5 <itertools.chain object at 0x7febfb44ba90>
<itertools.chain object at 0x7febfb44bb38> @test1_chunk7 chunk_length=5 <itertools.chain object at 0x7febfb44b940>
<itertools.chain object at 0x7febfb44bb70> @test1_chunk8 chunk_length=5 <itertools.chain object at 0x7febfb44bc50>
<itertools.chain object at 0x7febfb44ba58> @test1_chunk9 chunk_length=5 <itertools.chain object at 0x7febfb44bba8>
<itertools.chain object at 0x7febfb44bbe0>
I think the problem is on https://github.com/nanoporetech/pomoxis/blob/ad462b00de316f5ef0825ccbac0dc45bb85d9989/pomoxis/util.py#L105
that zip two
itertools.chain
objects.