Skip to content

Commit 17a0986

Browse files
committed
Merge branch 'release/1.2.0'
2 parents 9350201 + 5b8ff48 commit 17a0986

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+22298
-2655
lines changed

.github/workflows/pack_cwls.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
python-version: [3.6, 3.7]
17+
python-version: [3.7, 3.8, 3.9]
1818
steps:
1919
- uses: actions/checkout@v2
2020
with:
@@ -25,7 +25,7 @@ jobs:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install cwltool
2727
run: |
28-
python -m pip install toil[cwl]==4.2.0
28+
python -m pip install toil[cwl]==5.7.1
2929
- name: Run cwltool --pack for all workflows
3030
run: |
3131
echo Removing old packed workflows

.github/workflows/validate_cwls.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: [3.6, 3.7]
15+
python-version: [3.7, 3.8, 3.9]
1616
steps:
1717
- uses: actions/checkout@v2
1818
with:
@@ -23,7 +23,7 @@ jobs:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install cwltool
2525
run: |
26-
python -m pip install toil[cwl]==4.2.0
26+
python -m pip install toil[cwl]==5.7.1
2727
- uses: actions/checkout@v2
2828
- name: Validate
2929
run: |

alignment/alignment__packed.cwl

Lines changed: 113 additions & 113 deletions
Large diffs are not rendered by default.

athena_report/README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
### Introduction
2+
The sub-workflow runs all steps required to generate an [athena](https://github.com/msk-access/athena) coverage report:
3+
4+
1. Annotate BED file.
5+
2. Generating Coverage statistics
6+
3. Generating Coverage Report
7+
8+
9+
## CWL athena_report.cwl
10+
11+
- CWL specification 1.2
12+
- Use example_inputs.yaml to see the inputs to the cwl
13+
- Example Command using [toil](https://toil.readthedocs.io):
14+
15+
```bash
16+
> cwltool athena_report/athena_report.cwl athena_report/example_inputs_juno.yaml
17+
```
18+
**If at MSK, using the JUNO cluster having installed toil-msk version 3.21.1 you can use the following command**
19+
20+
### Using toil-cwl-runner
21+
22+
```bash
23+
#Using CWLTOOL
24+
> toil-cwl-runner --singularity athena_report/athena_report.cwl athena_report/example_inputs_juno.yaml
25+
```
26+
27+
28+
### Usage:
29+
30+
```
31+
Usage: qc_collapsed_bam.cwl [OPTIONS]
32+
33+
This tool runs all steps associated with generating an athena coverage report.
34+
35+
Options:
36+
37+
-p / --panel_bed : Input panel bed file; must have ONLY the following 4 columns chromosome, start position, end position, gene/transcript
38+
39+
-t / --transcript_file : Transcript annotation file, contains required gene and exon information. Must have ONLY the following 6 columns:
40+
chromosome, start, end, gene, transcript, exon
41+
42+
-c / --coverage_file : Per base coverage file (output from mosdepth or similar)
43+
44+
-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
45+
46+
-n / --output_name : (optional) Prefix for naming output file, if not given will use name from per base coverage file
47+
48+
--file: annotated bed file on which to generate report from
49+
50+
--build: text file with build number used for alignment, output from mosdepth (optional)
51+
52+
--outfile: output file name prefix, if not given the input file name will be used as the name prefix
53+
54+
--thresholds: threshold values to calculate coverage for as comma seperated integers (default: 10, 20, 30, 50, 100)
55+
56+
--flagstat: flagstat file for sample, required for generating run statistics (in development)
57+
58+
--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
59+
60+
-s / --snps: VCF(s) of known SNPs to check coverage of (optional; i.e. HGMD, ClinVar)
61+
62+
-t / --threshold: threshold value defining sub-optimal coverage (optional; default if not given: 20)
63+
64+
-n / --sample_name: name for title of report (optional; gene_stats file name will be used if not given)
65+
66+
-o / --output: name for output report (optional; sample name will be used if not given)
67+
68+
-p / --panel: panel bed file used for initial annotation, name will be displayed in summary of report (optional)
69+
70+
-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)
71+
72+
-m / --summary: boolean flag to add clinical report summary text in summary section, includes list of all genes with transcripts (optional; default False)
73+
74+
```

athena_report/athena_report.cwl

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
#!/usr/bin/env cwl-runner
2+
3+
cwlVersion: v1.2
4+
class: Workflow
5+
inputs:
6+
# input for annotate
7+
- id: transcript_file
8+
type: File?
9+
- id: chunk_size
10+
type: int?
11+
- id: output_name
12+
type: string?
13+
# input for stat
14+
- id: build
15+
type: File?
16+
- id: flagstat
17+
type: File?
18+
- id: thresholds
19+
type: 'int[]?'
20+
# input for report
21+
- id: threshold
22+
type: int?
23+
- id: sample_name
24+
type: string?
25+
- id: output
26+
type: string?
27+
- id: limit
28+
type: int?
29+
- id: summary
30+
type: boolean?
31+
- id: snps
32+
type:
33+
- 'null'
34+
- File
35+
- type: array
36+
items: File
37+
# shared
38+
- id: panel_bed
39+
type: File?
40+
- id: coverage_file
41+
type: File?
42+
- id: cores
43+
type: int?
44+
45+
46+
47+
48+
outputs:
49+
coverage_report_single:
50+
type: File
51+
outputSource: report/coverage_report_single
52+
53+
steps:
54+
annotate:
55+
run: ../command_line_tools/athena/1.4.2/annotate_bed/annotate_bed.cwl
56+
in:
57+
panel_bed: panel_bed
58+
transcript_file: transcript_file
59+
coverage_file: coverage_file
60+
chunk_size: chunk_size
61+
output_name: output_name
62+
when: ${
63+
if (inputs.panel_bed == null || inputs.transcript_file == null || inputs.coverage_file == null){
64+
return false
65+
}
66+
else {
67+
return true
68+
}
69+
}
70+
out: [annotated_bed]
71+
stats:
72+
run: ../command_line_tools/athena/1.4.2/coverage_stats_single/coverage_stats_single.cwl
73+
in:
74+
file: annotate/annotated_bed
75+
build: build
76+
flagstat: flagstat
77+
thresholds: thresholds
78+
cores: cores
79+
when: ${
80+
if (inputs.file == null){
81+
return false
82+
}
83+
else {
84+
return true
85+
}
86+
}
87+
out: [gene_stats_output, exon_stats_output]
88+
report:
89+
run: ../command_line_tools/athena/1.4.2/coverage_report_single/coverage_report_single.cwl
90+
in:
91+
raw_coverage: annotate/annotated_bed
92+
gene_stats: stats/gene_stats_output
93+
exon_stats: stats/exon_stats_output
94+
per_base_coverage: coverage_file
95+
panel: panel_bed
96+
snps: snps
97+
threshold: threshold
98+
sample_name: sample_name
99+
output: output
100+
limit: limit
101+
summary: summary
102+
cores: cores
103+
when: ${
104+
if (inputs.raw_coverage == null || inputs.gene_stats == null || inputs.exon_stats == null){
105+
return false
106+
}
107+
else {
108+
return true
109+
}
110+
}
111+
out: [coverage_report_single]
112+
113+
requirements:
114+
InlineJavascriptRequirement: {}
115+
MultipleInputFeatureRequirement: {}

0 commit comments

Comments
 (0)