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

Allow a specified output name in bgzip #1747

Merged
merged 2 commits into from
Feb 19, 2024

Conversation

whitwham
Copy link
Contributor

Choose a specific output name for a bgzipped file. e.g.

bgzip file.txt -o myfile.txt.gz

This will overwrite files without warning but will not change the existing source files and it will not conserve file modification dates.

Fixes #1726.

@jkbonfield
Copy link
Contributor

More complex than I expected indeed.

It passed all the things I could think of bar one. "-" as a synonym for stdin/stdout works for -o when compressing but not when decompressing. bgzip -d -o - -k foo.gz writes to a file named "-".

@whitwham
Copy link
Contributor Author

There is some special code to handle stdout already present. I've changed it so "-o -" is treated as -c instead.

@jkbonfield jkbonfield merged commit f19b844 into samtools:develop Feb 19, 2024
9 checks passed
@whitwham whitwham deleted the bgzip_out_option_a branch March 27, 2024 16:29
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.

bgzip: allow specification of output name.
2 participants