Expand "samtools --version" with more details.#1371
Expand "samtools --version" with more details.#1371daviesrob merged 1 commit intosamtools:developfrom
Conversation
|
This is so voluminous that the version number has disappeared off the top of even a very tall terminal window! Could consider leaving And/or making it less voluminous, e.g., I don't think there's any information in the HTS_FEATURE_FOO breakdown that's not in the feature string, hence and similarly with squeezing each plugin onto one line each, perhaps. |
|
I did think about a Yeah the plugin lines could probably be squashed. I'll have a play. |
|
How about this? Note also that I do think a subcommand may be more obvious though (and I can remove the extra usage line reporting the various --options then). |
The That's pretty much compact enough now that IMHO it wouldn't interfere with the well-known output if that was folded into the and for users I would suggest replacing |
|
I think I prefer Regarding plugins, I'm calling it that as it's what htslib calls it itself. I don't know what the intention was, but I always assumed given we called it plugins that it was originally intended to be a general purpose plugin system and not limited purely to transport layers. Eg maybe a company with its own custom file type could ship this as an htslib plugin. AFAIK there's nothing to stop that. It just needs a prefix: eg "zam:foo.zam" and register zam. It's not quite transparent syntax, but close. We could trivially add some logic to the library so that filename ".suffix" if unknown but with a registered "suffix" plugin, automatically uses it. |
8ad9734 to
ba2f478
Compare
|
Ok I went with making --version the same, and squashed it together. Edit: I left plugins as-is. If we wish to start calling them URL schemes, we need to change a lot more than this as it's documented in the various install files and also in samtools.1 description of HTS_PATH. We should be consistent. We can follow this up with a separate PR to change the language in all places if we wish. |
5e7c17e to
31d61a6
Compare
|
I thought you meant Also aargh tabs in test.pl — I feel your pain 😄 The intention was that HTSlib's plugin system would be a general-purpose system that could have several attachment points within htslib. The first attachment point implemented (and so far the only one) is the file transport one, which loads plugins matching As for custom file formats, that's been shoe-horned into being done via a pseudo URL scheme for them in a couple of cases: see crypt4gh: and cip:. But these are easy as they are really just encrypted versions of existing htslib-supported formats. It would be tedious to shoehorn a real custom file format in via the existing hFILE plugin endpoint, because you'd have to implement a
So, to be precise, htslib calls these “hFILE plugins”. So
Yes — a pseudo URL scheme called |
Expand "samtools --version" with more details and added a synonym of "samtools version" too so it's simpler to list in the usage. Also added the missing help subcommand in the usage list. Note this isn't exactly the same as samtools without args, as that is an error, while this reports to stdout.
31d61a6 to
32de3e4
Compare
|
Rebased to get rid of the merge conflict. |
|
I just saw this previous comment from James:
That's a red herring IMHO. The install files and especially the But this part of the samtools capabilities report is about samtools/htslib's file access capabilities. That's a different angle, and from the users' point of view is really about what URL schemes are understood. In particular, this includes the built-in ones, which aren't plugins. |
|
Hmm, possibly the text could be tweaked to say "handler" instead of "plugin"? |
|
[Sorry, I had already composed the previous comment when you hit merge, so I posted it anyway.]
It's all quite minor and angels-on-a-pinhead-esque 😄, but the three technical problems with But IMHO the real (albeit technologically minor) problem is that this text is here to be read by samtools users. And plugins, handlers, hFILE, etc are all terms that are meaningless to samtools users. Hence the suggestion to use URL schemes as a shorthand for “Kinds of remote files that can be accessed” — which is what hFILE plugins/handlers is about from the user's perspective. URL scheme is still a technical term, but at least it's an accurate general term that people can look up. |
|
I'm not saying that plugins is the correct term, but I stand by my comment earlier. If we feel that plugins is a confusing term to the users, then it's more than just this which needs fixing. Eg from the man page: I know many of the built in URL handlers aren't plugins by default, but many can also become plugins (and indeed forcibly will if plugins are enabled, which IMO is a poor choice as I'd like the ability to support plugins without punting everything out to them). If you wish to rename the version information, then I'd suggest a PR with man page updates too to clarify things (rather than to use "terms that are meaningless to samtools users"). |
|
I started writing a sentence about that, but deleted it because I hoped we wouldn't need to discuss it. There are different categories of users. “Plugins” is confusing in some contexts for some users some of the time, but not in other contexts at other times. If you're reading about If you're reading this But, in the end, whatevs 😄 |
|
Ok, how about a mix then like "URL schemes (plugins)"? I just think it's confusing to use two different terms for the same thing and may lead people to assume that plugins are not the same as URL schemes when they clearly are. |
This uses the new htslib introspection functions to report build information for htslib and which plugins it supports.
Also added similar logic to Samtools build, adding more variables to version.h (similar to Htslib's new config_vars.h).
Finally, the main samtools usage admits the existence of --version, --version-only and --help options, as the usage statement implies no [options] can be given without specifying a command.