diff --git a/Workflows/impute.md b/Workflows/impute.md index e32ef1578..b2b565b5a 100644 --- a/Workflows/impute.md +++ b/Workflows/impute.md @@ -44,8 +44,8 @@ harpy impute OPTIONS... INPUTS... ``` ```bash example -# create stitch parameter file 'stitch.params' -harpy stitchparams -o stitch.params +# create the parameter file 'stitch.params' +harpy imputeparams -o stitch.params # run imputation harpy impute --threads 20 --vcf Variants/mpileup/variants.raw.bcf --parameters stitch.params Align/ema @@ -86,7 +86,7 @@ Typically, one runs STITCH multiple times, exploring how results vary with different model parameters (explained in next section). The solution Harpy uses for this is to have the user provide a tab-delimited dataframe file where the columns are the 6 STITCH model parameters and the rows are the values for those parameters. The parameter file -is required and can be created manually or with [!badge corners="pill" text="harpy stitchparams"](other.md/#stitchparams). +is required and can be created manually or with [!badge corners="pill" text="harpy imputeparams"](other.md/#imputeparams). If created using harpy, the resulting file includes largely meaningless values that you will need to adjust for your study. The parameter must follow a particular format: - tab or comma delimited diff --git a/Workflows/other.md b/Workflows/other.md index 08be3f705..0c3f089e9 100644 --- a/Workflows/other.md +++ b/Workflows/other.md @@ -12,9 +12,44 @@ Some parts of Harpy (variant calling, imputation) want or need extra files. You {.compact} | module | description | | :------------- | :------------------------------------------------------------------------------- | +| `imputeparams` | Create a template imputation parameter file | | `resume` | Continue a Harpy workflow from an existing output folder | | `popgroup` | Create generic sample-group file using existing sample file names (fq.gz or bam) | -| `stitchparams` | Create template STITCH parameter file | +| `view` | View a workflow log, config, or snakefile | + +### imputeparams +Create a template parameter file for the [!badge corners="pill" text="impute"](/Workflows/impute.md) module. +The file is formatted correctly and serves as a starting point for using parameters that make sense for your study. + +```bash usage +harpy imputeparams -o OUTPUTFILE +``` + +```bash example +harpy imputeparams -o params.stitch +``` + +#### arguments +{.compact} +| argument | short name | description | +| :--------- | :--------: | :-------------------------------------------------------------- | +| `--output` | `-o` | [!badge variant="info" text="required"] Name of the output file | + +Typically, one runs STITCH multiple times, exploring how results vary with +different model parameters. The solution Harpy uses for this is to have the user +provide a tab-delimited dataframe file where the columns are the 6 STITCH model +parameters and the rows are the values for those parameters. To make formatting +easier, a template file is generated for you, just replace the values and add/remove +rows as necessary. See the section for the [!badge corners="pill" text="impute"](/Workflows/impute.md) +module for details on these parameters. The template file will look like: + +```text params.stitch +name model usebx bxlimit k s ngen +k10_ng50 diploid TRUE 50000 3 2 10 +k1_ng30 diploid TRUE 50000 3 1 5 +high_ngen diploid TRUE 50000 15 1 100 +``` +--- ### resume When calling a workflow (e.g. [!badge corners="pill" text="qc"](qc.md)), Harpy performs various file checks @@ -31,7 +66,7 @@ harpy resume [--conda] DIRECTORY | argument | short name | type | description | | :---------- | :--------: | :------------------- | :------------------------------------------------------------------------------------- | | `DIRECTORY` | | file/directory paths | [!badge variant="info" text="required"] Output directory of an existing harpy workflow | -| `--conda` | | toggle | generate a `.harpy_envs/` folder with the necessary conda enviroments | +| `--conda` | | toggle | Generate a `/workflow/envs` folder with the necessary conda enviroments | The `DIRECTORY` is the output directory of a previous harpy-invoked workflow, which **must** have the `workflow/config.yaml` file. For example, if you previously ran `harpy align bwa -o align-bwa ...`, then you would use `harpy resume align-bwa`, @@ -39,7 +74,7 @@ which would have the necessary `workflow/config.yaml` (and other necessary thing Using [!badge corners="pill" text="resume"] does **not** overwrite any preprocessing files in the target directory (whereas rerunning the workflow would), which means you can also manually modify the `config.yaml` file (advanced, not recommended unless you are confident with what you're doing). -[!badge corners="pill" text="resume"] also requires an existing and populated `.harpy_envs/` directory in the current work directory, like the kind all +[!badge corners="pill" text="resume"] also requires an existing and populated `workdir/envs/` directory in the target directory, like the kind all main `harpy` workflows would create. If one is not present, you can use `--conda` to create one. ### popgroup @@ -57,7 +92,7 @@ harpy popgroup -o samples.groups data/ | argument | short name | type | description | | :--------- | :--------: | :------------------- | :-------------------------------------------------------------------------------------------- | | `INPUTS` | | file/directory paths | [!badge variant="info" text="required"] Files or directories containing input FASTQ/BAM files | -| `--output` | `-o` | file path | [!badge variant="info" text="required"] name of the output file | +| `--output` | `-o` | file path | [!badge variant="info" text="required"] Name of the output file | This optional file is useful if you want SNP variant calling to happen on a per-population level via [!badge corners="pill" text="harpy snp"](snp.md/#populations) or on samples @@ -74,35 +109,25 @@ sample4 pop1 sample5 pop3 ``` --- -### stitchparams -Create a template parameter file for the [!badge corners="pill" text="impute"](/Workflows/impute.md) module. The file is formatted correctly and serves -as a starting point for using parameters that make sense for your study. + +### view +This convenience command lets you view the latest workflow log file +of a Harpy output directory. Use `--snakefile` or `--config` to view the workflow +snakefile or config.yaml file instead, respectively. Output is printed to the screen via `less` and +accepts the typical [keyboard shortcuts to navigate](https://gist.github.com/glnds/8862214) the output. ```bash usage -harpy stitchparams -o OUTPUTFILE +harpy view [-s] [-c] DIRECTORY ``` ```bash example -harpy stitchparams -o params.stitch +harpy view Align/bwa ``` #### arguments {.compact} -| argument | short name | description | -| :--------- | :--------: | :-------------------------------------------------------------- | -| `--output` | `-o` | [!badge variant="info" text="required"] name of the output file | - -Typically, one runs STITCH multiple times, exploring how results vary with -different model parameters. The solution Harpy uses for this is to have the user -provide a tab-delimited dataframe file where the columns are the 6 STITCH model -parameters and the rows are the values for those parameters. To make formatting -easier, a template file is generated for you, just replace the values and add/remove -rows as necessary. See the section for the [!badge corners="pill" text="impute"](/Workflows/impute.md) -module for details on these parameters. The template file will look like: - -```text params.stitch -name model usebx bxlimit k s ngen -k10_ng50 diploid TRUE 50000 3 2 10 -k1_ng30 diploid TRUE 50000 3 1 5 -high_ngen diploid TRUE 50000 15 1 100 -``` \ No newline at end of file +| argument | short name | description | +| :------------ | :--------: | :------------------------------------------------------------------------------------- | +| `DIRECTORY` | | [!badge variant="info" text="required"] Output directory of an existing harpy workflow | +| `--snakemake` | `-s` | View the workflow snakefile instead | +| `--config` | `-c` | View the `config.yaml` file instead | \ No newline at end of file diff --git a/index.md b/index.md index 3532e9bb9..849097e38 100644 --- a/index.md +++ b/index.md @@ -62,12 +62,13 @@ You can call `harpy` without any arguments (or with `--help`) to print the docst │ metassembly Create a metassembly from linked-reads │ ╰─────────────────────────────────────────────────────────────────────────╯ ╭─ Other Commands ────────────────────────────────────────────────────────╮ -│ resume Resume a workflow from an existing Harpy directory │ -│ hpc Profile templates for cluster job submissions │ -│ preflight File format checks for haplotag data │ │ deconvolve Resolve clashing barcodes from different molecules │ +│ hpc Profile templates for cluster job submissions │ +│ imputeparams Create a template imputation parameter file │ │ popgroup Create a template grouping file for samples │ -│ stitchparams Create a template STITCH parameter file │ +│ preflight File format checks for haplotag data │ +│ resume Resume a workflow from an existing Harpy directory │ +│ view View a workflow log, config, or snakefile │ ╰─────────────────────────────────────────────────────────────────────────╯ ``` diff --git a/retype.yml b/retype.yml index caad82eaa..f1010eacf 100644 --- a/retype.yml +++ b/retype.yml @@ -7,7 +7,7 @@ footer: copyright: "© Copyright {{ year }}. All rights reserved." branding: title: Harpy - label: v1.12 + label: v1.13 logo: static/logo_navbar.png logoDark: static/logo_navbar.png logoAlign: left