-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
22,298 additions
and
2,655 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {} |
Oops, something went wrong.