Skip to content

Clean-up barcode dictionary/detector classes #113

@magicDGS

Description

@magicDGS

Barcode detector and barcode dictionary is a bit messy regarding the code and difficult to debug. In addition, BarcodeDetector have no tests at all, and to pinpoint errors we should use an integration test for the tools. We should refactor and add tests for the following:

  • BarcodeDictionary should be refactored and cleaned. Methods names are confusing and some of then are not used at all.
  • BarcodeDictionaryTest refactoring (it still have the structure of Junit). It should be more exhaustive in the test paths.
  • BarcodeDictionaryFactory should disappear in favor of an static method in BarcodeDictionary to construct from a file. Edited: we should convert to a proper factory/builder, adding options such as create from SAM header file (@RG), or allowing patterns for ID generation and other tags in SAM-header.
  • Unit tests should be implemented for BarcodeDetector.
  • Major refactoring of BarcodeDetector. Current contracts and implementations are a mess and very difficult to debug. Requires tests for checking that nothing is broken. Edited: also should create with a builder to add different features for detection and make a smooth transition to the new classes/implemenations.
  • Move dictionary/decoder to a common package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions