How to fix this AssertionError?
Traceback (most recent call last): File "./rebaler-runner.py", line 9, in <module> main() File "/mnt/volume/Rebaler/rebaler/__main__.py", line 93, in main unpolished_sequences = build_unpolished_assembly(args, reference, ref_names, ref_seqs) File "/mnt/volume/Rebaler/rebaler/__main__.py", line 149, in build_unpolished_assembly print_partitions(ref_names, partitions, nicknames, ref_seqs) File "/mnt/volume/Rebaler/rebaler/__main__.py", line 345, in print_partitions ref_seqs[name]) File "/mnt/volume/Rebaler/rebaler/alignment.py", line 122, in get_read_seq_by_ref_coords assert match_count == self.matching_bases AssertionError
Hi @thinkgenome, for what it's worth, I encountered the same error today and discovered that it was due to lowercase characters in the reference causing a False comparison between the bases on the read and reference.
Hi @SamStudio8, I'm also running into this problem. Was it simply a matter of changing all nucleotides in the reference to UPPERCASE? I'm testing Rebaler on a draft Eukaryotic genome. Granted, it might not be the best use case...,
@templardrake I think I just made the comparison case-insensitive, but yes - you could achieve the same without editing the code by forcing your reads and/or reference to the same case.
Thanks for that tip! On the off chance, do you remember what variable comparison you turned case insensitive? It looks like the match_count assertion is int to int?
Incredibly, it looks like I actually pushed it up to Github back in Feb: https://github.com/SamStudio8/Rebaler/commit/868c2778976c3d610d01d0e02ecc1c8615987442 You're right, it is a counting assertion, but the match count only gets incremented if the bases match exactly.
On Thu, Sep 24, 2020 at 10:53 AM Krishna [email protected] wrote:
Thanks for that tip! On the off chance, do you remember what variable comparison you turned case insensitive? It looks like the match_count assertion is int to int?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rrwick/Rebaler/issues/13#issuecomment-698242214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIN6OQ742B7MTT3HBEACTTSHMJI7ANCNFSM4KOIF7VQ .