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

Short option for write-index #2139

Closed
mbhall88 opened this issue Mar 26, 2024 · 4 comments
Closed

Short option for write-index #2139

mbhall88 opened this issue Mar 26, 2024 · 4 comments

Comments

@mbhall88
Copy link
Contributor

I wonder if you would consider a short option for --write-index? I find myself using this option a lot and it would be nice for brevity's sake to have a shorter, single-char version.

@pd3
Copy link
Member

pd3 commented Mar 26, 2024

It is possible, -W would be a good choice and it is not taken.

@jkbonfield
Copy link
Contributor

I grepped and found the only thing using -W was bcftools cnv, but that is totally undocumented in both usage and man page. It's something to do with the Baum Welch algorithm, but that's also undocumented in the man page. Is this an omission, or just an experimental feature that shouldn't be exposed to the users yet?

Anyway, cnv doesn't output VCF/BCF data so it doesn't need a --write-index option. Hence I agree that -W is a suitable short form. -W also isn't used much in samtools, so we could mirror the same logic over there if we desired.

jkbonfield added a commit to jkbonfield/bcftools that referenced this issue Mar 26, 2024
Given --write-index now takes an optional argument, and optional long
options are --long-opt=arg and short options are -larg, I chose to
also accept -l=arg for the sake of consistency and ease of
documentation.  The standard -larg still works too.

If we wish to stick strictly to the normal conventions, then this is a
trivial change in version.c (and a search and replace in the
documentation).

Also fix formatting bug in bcftools merge man page section leading to
a lot of underlined text.

Fixes samtools#2139
@pd3
Copy link
Member

pd3 commented Mar 27, 2024

It is an experimental feature and I am happy for it to be disabled with a comment. Thank you

@jkbonfield
Copy link
Contributor

No need to comment it out. I was just flagging it incase it was an error of documentation / usage.

@pd3 pd3 closed this as completed in ca95dfe Mar 28, 2024
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

No branches or pull requests

3 participants