Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshah committed Sep 22, 2022
2 parents 9350201 + 5b8ff48 commit 17a0986
Show file tree
Hide file tree
Showing 44 changed files with 22,298 additions and 2,655 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pack_cwls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7]
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -25,7 +25,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install cwltool
run: |
python -m pip install toil[cwl]==4.2.0
python -m pip install toil[cwl]==5.7.1
- name: Run cwltool --pack for all workflows
run: |
echo Removing old packed workflows
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validate_cwls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7]
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -23,7 +23,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install cwltool
run: |
python -m pip install toil[cwl]==4.2.0
python -m pip install toil[cwl]==5.7.1
- uses: actions/checkout@v2
- name: Validate
run: |
Expand Down
226 changes: 113 additions & 113 deletions alignment/alignment__packed.cwl

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions athena_report/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
### Introduction
The sub-workflow runs all steps required to generate an [athena](https://github.com/msk-access/athena) coverage report:

1. Annotate BED file.
2. Generating Coverage statistics
3. Generating Coverage Report


## CWL athena_report.cwl

- CWL specification 1.2
- Use example_inputs.yaml to see the inputs to the cwl
- Example Command using [toil](https://toil.readthedocs.io):

```bash
> cwltool athena_report/athena_report.cwl athena_report/example_inputs_juno.yaml
```
**If at MSK, using the JUNO cluster having installed toil-msk version 3.21.1 you can use the following command**

### Using toil-cwl-runner

```bash
#Using CWLTOOL
> toil-cwl-runner --singularity athena_report/athena_report.cwl athena_report/example_inputs_juno.yaml
```


### Usage:

```
Usage: qc_collapsed_bam.cwl [OPTIONS]
This tool runs all steps associated with generating an athena coverage report.
Options:
-p / --panel_bed : Input panel bed file; must have ONLY the following 4 columns chromosome, start position, end position, gene/transcript
-t / --transcript_file : Transcript annotation file, contains required gene and exon information. Must have ONLY the following 6 columns:
chromosome, start, end, gene, transcript, exon
-c / --coverage_file : Per base coverage file (output from mosdepth or similar)
-s / -chunk_size : (optional) nrows to split per-base coverage file for intersecting, with <16GB RAM can lead to bedtools intersect failing. Reccomended values: 16GB RAM -> 20000000; 8GB RAM -> 10000000
-n / --output_name : (optional) Prefix for naming output file, if not given will use name from per base coverage file
--file: annotated bed file on which to generate report from
--build: text file with build number used for alignment, output from mosdepth (optional)
--outfile: output file name prefix, if not given the input file name will be used as the name prefix
--thresholds: threshold values to calculate coverage for as comma seperated integers (default: 10, 20, 30, 50, 100)
--flagstat: flagstat file for sample, required for generating run statistics (in development)
--cores: Number of CPU cores to utilise, for larger numbers of genes this will drastically reduce run time. If not given will use maximum available
-s / --snps: VCF(s) of known SNPs to check coverage of (optional; i.e. HGMD, ClinVar)
-t / --threshold: threshold value defining sub-optimal coverage (optional; default if not given: 20)
-n / --sample_name: name for title of report (optional; gene_stats file name will be used if not given)
-o / --output: name for output report (optional; sample name will be used if not given)
-p / --panel: panel bed file used for initial annotation, name will be displayed in summary of report (optional)
-l / --limit: number of genes at which to limit including full gene plots, large numbers of genes may take a long time to generate the plots (optional)
-m / --summary: boolean flag to add clinical report summary text in summary section, includes list of all genes with transcripts (optional; default False)
```
115 changes: 115 additions & 0 deletions athena_report/athena_report.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/usr/bin/env cwl-runner

cwlVersion: v1.2
class: Workflow
inputs:
# input for annotate
- id: transcript_file
type: File?
- id: chunk_size
type: int?
- id: output_name
type: string?
# input for stat
- id: build
type: File?
- id: flagstat
type: File?
- id: thresholds
type: 'int[]?'
# input for report
- id: threshold
type: int?
- id: sample_name
type: string?
- id: output
type: string?
- id: limit
type: int?
- id: summary
type: boolean?
- id: snps
type:
- 'null'
- File
- type: array
items: File
# shared
- id: panel_bed
type: File?
- id: coverage_file
type: File?
- id: cores
type: int?




outputs:
coverage_report_single:
type: File
outputSource: report/coverage_report_single

steps:
annotate:
run: ../command_line_tools/athena/1.4.2/annotate_bed/annotate_bed.cwl
in:
panel_bed: panel_bed
transcript_file: transcript_file
coverage_file: coverage_file
chunk_size: chunk_size
output_name: output_name
when: ${
if (inputs.panel_bed == null || inputs.transcript_file == null || inputs.coverage_file == null){
return false
}
else {
return true
}
}
out: [annotated_bed]
stats:
run: ../command_line_tools/athena/1.4.2/coverage_stats_single/coverage_stats_single.cwl
in:
file: annotate/annotated_bed
build: build
flagstat: flagstat
thresholds: thresholds
cores: cores
when: ${
if (inputs.file == null){
return false
}
else {
return true
}
}
out: [gene_stats_output, exon_stats_output]
report:
run: ../command_line_tools/athena/1.4.2/coverage_report_single/coverage_report_single.cwl
in:
raw_coverage: annotate/annotated_bed
gene_stats: stats/gene_stats_output
exon_stats: stats/exon_stats_output
per_base_coverage: coverage_file
panel: panel_bed
snps: snps
threshold: threshold
sample_name: sample_name
output: output
limit: limit
summary: summary
cores: cores
when: ${
if (inputs.raw_coverage == null || inputs.gene_stats == null || inputs.exon_stats == null){
return false
}
else {
return true
}
}
out: [coverage_report_single]

requirements:
InlineJavascriptRequirement: {}
MultipleInputFeatureRequirement: {}
Loading

0 comments on commit 17a0986

Please sign in to comment.