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

Graceful error on gff3.gz files #4489

Merged
merged 4 commits into from
Jan 8, 2025
Merged

Graceful error on gff3.gz files #4489

merged 4 commits into from
Jan 8, 2025

Conversation

faithokamoto
Copy link
Contributor

@faithokamoto faithokamoto commented Jan 6, 2025

Changelog Entry

To be copied to the draft changelog by merger:

Description

Currently, .gz files will be accepted for vg rna's --transcripts or --introns flags, but when we actually try to parse them it fails. This change auto-detects such files via the .gz extension and gives a useful error message. This will have false positives and false negatives, since it relies on the filenames following convention, but actually reading the file and detecting compression is much more difficult.

Instead of failing to parse a bgzipped annotation file, just error early with an explanation.
src/subcommand/rna_main.cpp Outdated Show resolved Hide resolved
@@ -92,6 +92,7 @@ int32_t main_rna(int32_t argc, char** argv) {
string hap_gbwt_out_filename = "";
int32_t num_threads = 1;
bool show_progress = false;
string gz_suffix = ".gz";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might want to be GZ_SUFFIX and placed not right next to all the CLI parameters. Otherwise I expect there to be a CLI option to change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done this

faithokamoto and others added 2 commits January 7, 2025 09:57
Co-authored-by: Adam Novak <anovak@soe.ucsc.edu>
@faithokamoto faithokamoto merged commit 0a86f66 into master Jan 8, 2025
2 checks passed
@faithokamoto faithokamoto deleted the vg-rna-error-on-gz branch January 16, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vg rna can't parse bgzipped GFF3
2 participants