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

CLI (fixes #5) #7

Merged
merged 6 commits into from
Aug 24, 2017
Merged

CLI (fixes #5) #7

merged 6 commits into from
Aug 24, 2017

Conversation

Colelyman
Copy link
Member

Here is my proposed CLI for this package.
I envisioned a similar setup to samtools where the interface is split up into specific commands for each function in the package (bionode-seq reverse..., bionode-seq translate..., etc.).
I'm not sure if this is the best way to organize the interface, any thoughts or opinions would be greatly appreciated.

Currently, the input is a ndjson file where each line will be sent to the specified function.

One potential downfall of this organization is when one would like to perform different functions on different records in the same file.
I could set this up such that the function to be performed is included in each line of the input file so that one could easily perform different functions within the same file.

If anyone can think of a more elegant way to get the arguments from the functions, I am open to suggestions.
The only way that I could think of doing it is with the commands object, but this could be a pain to update as the interface to the functions change.

@Colelyman
Copy link
Member Author

Referencing issue #5

Copy link
Member

@bmpvieira bmpvieira left a comment

Choose a reason for hiding this comment

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

This is amazing, thank you so much! 🎉 😃

One potential downfall of this organization is when one would like to perform different functions on different records in the same file.

Can you give an example of what this implementation would look like?
Maybe we don't need to worry about this now. If someone wants to do different things on different lines, they could write an intermediate script with whatever conditions each line should meet (line number, comment, sequence, etc) and run the relevant seq function on that.
But feel free to add what you propose if you think it will be useful for you and others.

If anyone can think of a more elegant way to get the arguments from the functions

This is good for now, but maybe later we could refactor to do the arguments checking at the function level and avoid having to sync changes in the lib with command in the CLI.

Would you mind adding some tests for this new feature? I'll open another issue.

@bmpvieira bmpvieira changed the title CLI CLI (fixes #5) Aug 23, 2017
@bmpvieira bmpvieira mentioned this pull request Aug 23, 2017
@bmpvieira bmpvieira merged commit 36118de into bionode:master Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants