Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
syncrotron opened this issue Jan 5, 2022 · 0 comments
Open
Labels
fortification These issues are there to make the code more robust

Comments

@syncrotron
Copy link
Collaborator

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.

@syncrotron syncrotron added the fortification These issues are there to make the code more robust label Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fortification These issues are there to make the code more robust
Projects
None yet
Development

No branches or pull requests

1 participant