Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
adrosenbaum committed Mar 29, 2019
1 parent ebdbc66 commit 7a3e4e8
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 14 deletions.
72 changes: 71 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,75 @@ takes use of other CLI apps in the Clinical-Genomics suite, [hosekeeper](https:/
and [scout](https://github.com/Clinical-Genomics/scout), to assemble all relevant files, and meta-data about a case as
input to MutAcc.

##Install
## Dependencies

mutacc-auto depends on housekeeper >= 2.2 and scout >= 4.2. These tools must be installed first. mutacc-auto also uses the slurm workload manager to submit jobs.

## Install

mutacc-auto can be installed using pip,

```console
git clone https://github.com/Clinical-Genomics/mutacc-auto.git
cd mutacc-auto
pip install -e .
```
## Usage

### Extract

To use mutacc extract feature on a given case the 'extract' subcommand is used

To extract the clinically relevant reads from a case used

```console
mutacc-auto extract \
--config-file <mutacc_configuration> \
--case-id <case_id> \
--environment <conda_env> \
```

slurm specific options can be given with options --log-directory, --email.

full list of options

```console
Usage: mutacc-auto extract [OPTIONS]

Options:
-c, --case-id TEXT case id used in scout and housekeeper
-d, --days-ago INTEGER days since last update of case
-e, --environment TEXT conda environment used for mutacc
-C, --config-file PATH configuration file used for mutacc
-L, --log-directory PATH Directory for slurm logs
-E, --email TEXT email to notify
-p, --padding INTEGER padding for genomic regions. this defaults to 0
for WES cases
-D, --dry dry run
-V, --verbose verbose
-k, --conda Use 'conda activate' to source environment
--help Show this message and exit.

```

### Import

To import the extracted cases into the database (specified in the mutacc configuration file) the
'import' subcommand is used.

```console
mutacc-auto import \
--config-file <mutacc_configuration>
```

This will import all extracted cases.

```console
Usage: mutacc-auto import [OPTIONS]

Options:
-C, --config-file PATH configuration file used for mutacc
-D, --dry dry run
-V, --verbose verbose
--help Show this message and exit.
```
42 changes: 32 additions & 10 deletions mutacc_auto/cli/extract_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,38 @@
LOG = logging.getLogger(__name__)

@click.command('extract')
@click.option('-c','--case-id', type=str)
@click.option('-d','--days-ago', type=int)
@click.option('-e','--environment', type=str)
@click.option('-C','--config-file', type=click.Path(exists=True))
@click.option('-L', '--log-directory', type=click.Path(exists=True))
@click.option('-E', '--email', type=str)
@click.option('-p','--padding', type=int)
@click.option('-D','--dry', is_flag=True)
@click.option('-V','--verbose', is_flag=True)
@click.option('-k', '--conda', is_flag=True)
@click.option('-c','--case-id',
type=str,
help="case id used in scout and housekeeper")
@click.option('-d','--days-ago',
type=int,
help="days since last update of case")
@click.option('-e','--environment',
type=str,
help="conda environment used for mutacc"
)
@click.option('-C','--config-file',
type=click.Path(exists=True),
help="configuration file used for mutacc"
)
@click.option('-L', '--log-directory',
type=click.Path(exists=True),
help="Directory for slurm logs")
@click.option('-E', '--email',
type=str,
help="email to notify")
@click.option('-p','--padding',
type=int,
help="padding for genomic regions. this defaults to 0 for WES cases")
@click.option('-D','--dry',
is_flag=True,
help="dry run")
@click.option('-V','--verbose',
is_flag=True,
help="verbose")
@click.option('-k', '--conda',
is_flag=True,
help="Use 'conda activate' to source environment")
@click.pass_context
def extract_command(ctx,
case_id,
Expand Down
12 changes: 9 additions & 3 deletions mutacc_auto/cli/import_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@
LOG = logging.getLogger(__name__)

@click.command('import')
@click.option('-C','--config-file', type=click.Path(exists=True))
@click.option('-D','--dry', is_flag=True)
@click.option('-V','--verbose', is_flag=True)
@click.option('-C','--config-file',
type=click.Path(exists=True),
help="configuration file used for mutacc")
@click.option('-D','--dry',
is_flag=True,
help="dry run")
@click.option('-V','--verbose',
is_flag=True,
help="verbose")
@click.pass_context
def import_command(ctx,
config_file,
Expand Down

0 comments on commit 7a3e4e8

Please sign in to comment.