Skip to content

Added --help and --version options to hotspot v4.1.0 binary#1

Open
alexpreynolds wants to merge 1 commit intorthurman:masterfrom
alexpreynolds:master
Open

Added --help and --version options to hotspot v4.1.0 binary#1
alexpreynolds wants to merge 1 commit intorthurman:masterfrom
alexpreynolds:master

Conversation

@alexpreynolds
Copy link
Copy Markdown

(Hi Bob, just to explain, this is a "pull request", which means anyone can submit code, which you can decide whether or not to approve going into your project's source code. You can review the changes by clicking on the "Files changed" tab above this message window.)

I added code so that users can type in the option -h or --help to get a usage statement sent to standard output (exiting with a zero error code), and -v or --version to get the hotspot binary version and author/citation details sent to standard output (exiting with a zero error code).

If the incorrect number of arguments are specified, the binary still prints the same usage statement, but it is sent to standard error (exiting with the same non-zero error code as before).

These options work by throwing different types of custom exceptions, which can be modified in and added to in the hotspot namespace in Cluster.cpp, as more options are added down the road. The hotspot namespace is also where the version, author and citation strings are kept, for easy modification as new versions of the application are published.

The --version option format tries to follow the pattern used in BEDOPS tools, although the layout and content is easily modified by editing the output of the hotspot::Version() function in Cluster.cpp.

@rthurman
Copy link
Copy Markdown
Owner

Sounds great, Alex; thanks. I'll talk to you about making sure I'm doing
the github merge correctly.

On Thu, Apr 17, 2014 at 1:02 PM, Alex Reynolds notifications@github.comwrote:

I added code so that users can type in the option -h or --help to get a
usage statement sent to standard output (exiting with a zero error code),
and -v or --version to get the hotspot binary version and author/citation
details sent to standard output (exiting with a zero error code).

If the incorrect number of arguments are specified, the binary still
prints the same usage statement, but it is sent to standard error (exiting
with the same non-zero error code as before).

These options work by throwing different types of custom exceptions, which
can be modified in and added to in the hotspot namespace in Cluster.cpp,
as more options are added down the road. The hotspot namespace is also
where the version, author and citation strings are kept, for easy
modification as new versions of the application are published.

The --version option format tries to follow the pattern used in BEDOPS
tools, although the layout and content is easily modified by editing the

output of the hotspot::Version() function in Cluster.cpp.

You can merge this Pull Request by running

git pull https://github.com/alexpreynolds/hotspot master

Or view, comment on, or merge it at:

#1
Commit Summary

  • Added --help and --version options to hotspot binary

File Changes

Patch Links:


Reply to this email directly or view it on GitHubhttps://github.com//pull/1
.

Bob Thurman, Ph.D.
Research Scientist
Department of Genome Sciences
University of Washington

2211 Elliott Avenue Foege Building S-310
Suite 600 1705 NE Pacific St.
Seattle, WA 98121 Seattle, WA 98195-5065

206-267-1091 x207 206-685-2784

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.

2 participants