-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7af724c
commit b9d3edc
Showing
21 changed files
with
2,363 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Command-line examples | ||
|
||
- [Introduction](introduction_cli.ipynb) - Description of each command that offers *OpenVariant* with `openvar`. | ||
- [Main](main_cli.ipynb) - Bunch of examples that can be run in a shell. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,270 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"# Introduction" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%% md\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"**OpenVariant** offers a command-line interface (CLI) with the main tasks that also can be applied in Python scripts.\n", | ||
"\n", | ||
"On the following command you can check the different options that `openvar` can run." | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%% md\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Usage: openvar [OPTIONS] COMMAND [ARGS]...\n", | ||
"\n", | ||
" 'openvar' is the command-line interface of OpenVariant. Parsing and data\n", | ||
" transformation of multiple input formats.\n", | ||
"\n", | ||
"Options:\n", | ||
" --version Show the version and exit.\n", | ||
" -h, --help Show this message and exit.\n", | ||
"\n", | ||
"Commands:\n", | ||
" cat Concatenate parsed files to standard output.\n", | ||
" count Number of rows that matches a specified criterion.\n", | ||
" groupby Group the parsed result for each different value of the specified\n", | ||
" key.\n", | ||
" plugin Actions to execute for a plugin: create.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%%bash\n", | ||
"openvar --help" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%%\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"### ***Cat*** command" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%% md\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Usage: openvar cat [OPTIONS] [INPUT_PATH]\n", | ||
"\n", | ||
" Print the parsed files on the stdout/\"output\".\n", | ||
"\n", | ||
"Options:\n", | ||
" -w, --where TEXT Filter expression. eg: CHROMOSOME == 4\n", | ||
" -a, --annotations PATH Annotation path. eg: /path/annotation_vcf.yaml\n", | ||
" --header Show the result header.\n", | ||
" -o, --output TEXT File to write the output.\n", | ||
" -h, --help Show this message and exit.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%%bash\n", | ||
"openvar cat --help" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%%\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"### ***Count*** command" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%% md\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Usage: openvar count [OPTIONS] [INPUT_PATH]\n", | ||
"\n", | ||
" Print on the stdout/\"output\" the number of rows that meets the criteria.\n", | ||
"\n", | ||
"Options:\n", | ||
" -w, --where TEXT Filter expression. eg: CHROMOSOME == 4\n", | ||
" -g, --group_by TEXT Key to group rows. eg: COUNTRY\n", | ||
" -a, --annotations PATH Annotation path. eg: /path/annotation_vcf.yaml\n", | ||
" -c, --cores INTEGER Maximum processes to run in parallel.\n", | ||
" -q, --quite Don't show the progress.\n", | ||
" -o, --output TEXT File to write the output.\n", | ||
" -h, --help Show this message and exit.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%%bash\n", | ||
"openvar count --help" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%%\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"### ***Group by*** command" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%% md\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Usage: openvar groupby [OPTIONS] [INPUT_PATH]\n", | ||
"\n", | ||
" Print on the stdout/\"output\" the parsed files group by a specified field.\n", | ||
"\n", | ||
"Options:\n", | ||
" --header Show the result header.\n", | ||
" --show Show group by each row.\n", | ||
" -w, --where TEXT Filter expression. eg: CHROMOSOME == 4\n", | ||
" -g, --group_by TEXT Key to group rows. eg: COUNTRY\n", | ||
" -s, --script TEXT Filter expression. eg: gzip >\n", | ||
" \\${GROUP_KEY}.parsed.tsv.gz\n", | ||
" -a, --annotations PATH Annotation path. eg: /path/annotation_vcf.yaml\n", | ||
" -c, --cores INTEGER Maximum processes to run in parallel.\n", | ||
" -q, --quite Don't show the progress.\n", | ||
" -o, --output TEXT File to write the output.\n", | ||
" -h, --help Show this message and exit.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%%bash\n", | ||
"openvar groupby --help" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%%\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"### ***Plugin*** command" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%% md\n" | ||
} | ||
} | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 5, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Usage: openvar plugin [OPTIONS] {create}\n", | ||
"\n", | ||
" Actions to apply on the plugin system.\n", | ||
"\n", | ||
"Options:\n", | ||
" -n, --name TEXT Name of the plugin.\n", | ||
" -d, --directory TEXT Directory to reach the plugin.\n", | ||
" -h, --help Show this message and exit.\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"%%bash\n", | ||
"openvar plugin --help" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"pycharm": { | ||
"name": "#%%\n" | ||
} | ||
} | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
Oops, something went wrong.