Skip to content

Remove magic indexing from server/app/main/utils/FASTQFileHandler.py #59

@syncrotron

Description

@syncrotron

Within FASTQFileHandler, os.popen calls awk print to dump the contents of the minimap2 report file. To find match_alert_header, num_match, and tot_len (of which later two are used in presence threshold calculations) are found within the awk pipe via magic indexing. If awk was ever to fail or produce something unexpected, the indexing would fail, causing MICAS to fail to notify the end user of a threshold being reached.

This could be fixed via some form of named indexing or error handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fortificationThese issues are there to make the code more robust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions