campanam/BaitsTools

[BUG] Annotations without matching reference sequence

Closed this issue · 1 comments

Describe the bug
If an annotation specifies a sequence that does not exist in the reference sequence, there is a nil error and it crashes.

To Reproduce
Use annotation without matching reference sequence.

OS and Version
macOS and BaitsTools 1.7.2.

Error Messages and Logs
** Using BaitsTools v. 1.7.2, annot2baits v. 1.6.8, and baitslib v. 1.7.2 **
** Reading reference sequence **
** Reading annotation file **
Traceback (most recent call last):
4: from /Users/campanam/baitstools/baitstools.rb:1108:in <main>' 3: from /Users/campanam/baitstools/annot2baits.rb:22:in annot2baits'
2: from /Users/campanam/baitstools/baitslib.rb:447:in gz_file_open' 1: from /Users/campanam/baitstools/annot2baits.rb:32:in block in annot2baits'
/Users/campanam/baitstools/baitslib.rb:887:in get_looped_sequence': undefined method circular' for nil:NilClass (NoMethodError)

Additional context
Simply need to add an error message and continue past it.

Fixed in 1.7.3