Skip to content

Commit

Permalink
update to 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Nov 26, 2024
1 parent 57da1aa commit 9722fe0
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 35 deletions.
6 changes: 3 additions & 3 deletions Workflows/impute.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
79 changes: 52 additions & 27 deletions Workflows/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -31,15 +66,15 @@ 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`,
which would have the necessary `workflow/config.yaml` (and other necessary things) required to successfully continue the workflow.
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
Expand All @@ -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
Expand All @@ -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
```
| 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 |
9 changes: 5 additions & 4 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 │
╰─────────────────────────────────────────────────────────────────────────╯
```

Expand Down
2 changes: 1 addition & 1 deletion retype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9722fe0

Please sign in to comment.