Skip to content

Commit

Permalink
fix: added requirements for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmartmillan committed Jul 29, 2022
1 parent 7af724c commit b9d3edc
Show file tree
Hide file tree
Showing 21 changed files with 2,363 additions and 5 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,4 @@ out/
atlassian-ide-plugin.xml

# Documentation
docs/examples/find_files
docs/examples/variant
docs/examples/tasks
docs/examples/cli
docs/examples/plugin_system
docs/_build/
4 changes: 4 additions & 0 deletions docs/examples/cli/README.md
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.
270 changes: 270 additions & 0 deletions docs/examples/cli/introduction_cli.ipynb
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
}
Loading

0 comments on commit b9d3edc

Please sign in to comment.