Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cwl results #94

Merged
merged 5 commits into from
Oct 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ test: $(PYSOURCES) cwltest
cwltest: wdl2cwl/tests/cwl_files/*.cwl wdl2cwl/tests/*
cd wdl2cwl/tests && cwltest --tool cwltool --test cwl_tests.yaml

cwltest_big: wdl2cwl/tests/cwl_files/*.cwl wdl2cwl/tests/*
cd wdl2cwl/tests && cwltest --tool cwltool --test cwl_tests_big.yaml

## testcov : run the ${MODULE} test suite and collect coverage
testcov: $(PYSOURCES)
pytest --cov
Expand Down
1 change: 1 addition & 0 deletions wdl2cwl/tests/cwl_files/CollectQualityYieldMetrics.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ requirements:
INPUT=$(inputs.input_bam.path) \
OQ=true \
OUTPUT=$(inputs.metrics_filename)
sed -i -e 1,5d $(inputs.metrics_filename) # for reproducibility
- class: InlineJavascriptRequirement
- class: NetworkAccess
networkAccess: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ requirements:
$(inputs.collect_gc_bias_metrics ? 'PROGRAM="CollectGcBiasMetrics"' : "") \
METRIC_ACCUMULATION_LEVEL=null \
METRIC_ACCUMULATION_LEVEL=READ_GROUP
sed -i -e 1,5d "$(inputs.output_bam_prefix).alignment_summary_metrics" # for reproducibility
- class: InlineJavascriptRequirement
- class: NetworkAccess
networkAccess: true
Expand Down
16 changes: 10 additions & 6 deletions wdl2cwl/tests/cwl_files/deepvariant.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ inputs:
- string
- 'null'
- id: regions
type:
- File
- 'null'
type: string
- id: sampleName
type:
- string
Expand Down Expand Up @@ -91,15 +89,21 @@ requirements:
entry: |4

set -e
mkdir reference_dir
ln -s $(inputs.referenceFasta.path) reference_dir/\$(basename $(inputs.referenceFasta.path))
ln -s $(inputs.referenceFastaIndex.path) reference_dir/\$(basename $(inputs.referenceFastaIndex.path))
mkdir bam_dir
ln -s $(inputs.inputBam.path) bam_dir/\$(basename $(inputs.inputBam.path))
ln -s $(inputs.inputBamIndex.path) bam_dir/\$(basename $(inputs.inputBamIndex.path))
/opt/deepvariant/bin/run_deepvariant \
--ref $(inputs.referenceFasta.path) \
--reads $(inputs.inputBam.path) \
--ref reference_dir/\$(basename $(inputs.referenceFasta.path)) \
--reads bam_dir/\$(basename $(inputs.inputBam.path)) \
--model_type $(inputs.modelType) \
--output_vcf $(inputs.outputVcf) \
$(inputs.outputGVcf === null ? "" : "--output_gvcf " + inputs.outputGVcf ) \
$(inputs.customizedModel === null ? "" : "--customized_model " + inputs.customizedModel.path ) \
$(inputs.numShards === null ? "" : "--num_shards " + inputs.numShards ) \
$(inputs.regions === null ? "" : "--regions " + inputs.regions.path ) \
--regions $(inputs.regions) \
$(inputs.sampleName === null ? "" : "--sample_name " + inputs.sampleName ) \
$(inputs.postprocessVariantsExtraArgs === null ? "" : "--postprocess_variants_extra_args " + inputs.postprocessVariantsExtraArgs ) \
$(inputs.VCFStatsReport ? "--vcf_stats_report" : "--novcf_stats_report")
Expand Down
9 changes: 9 additions & 0 deletions wdl2cwl/tests/cwl_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
job: inputs/validateOptimus_2.yaml
output:
result: PASS
- doc: CollectQualityYieldMetrics
tool: cwl_files/CollectQualityYieldMetrics.cwl
job: inputs/CollectQualityYieldMatrics.yaml
output:
quality_yield_metrics:
basename: collect_quality_yield_metrics.quals.txt
checksum: sha1$870d2ec27fb38292079c8b135fdf864c03f32bfe
class: File
size: 261

# Tests for doc: bcftools_stats
- doc: bcftools_stats
Expand Down
9 changes: 9 additions & 0 deletions wdl2cwl/tests/inputs/CollectQualityYieldMatrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input_bam:
class: File
path: valid.bam
doc: |
From https://github.com/broadinstitute/gatk/blob/7f96bf6677040851c6da3cb96d97f957f1df05bc/src/test/resources/org/broadinstitute/hellbender/metrics/analysis/CollectQualityYieldMetrics/valid.bam
Copyright 2021 Broad Institute, Inc.
Licensed under the Apache License, Version 2.0 (the "License")
metrics_filename: collect_quality_yield_metrics.quals.txt
preemptible_tries: 0
22 changes: 22 additions & 0 deletions wdl2cwl/tests/inputs/CollectReadgroupBamQualityMetrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
input_bam:
class: File
path: RP-929.NA12878.bam
doc: created from running https://github.com/mr-c/warp/blob/more_public_data/pipelines/broad/reprocessing/external/exome/test_inputs/Plumbing/RP-929.NA12878.json
input_bam_index:
class: File
path: RP-929.NA12878.bai
doc: created from running https://github.com/mr-c/warp/blob/more_public_data/pipelines/broad/reprocessing/external/exome/test_inputs/Plumbing/RP-929.NA12878.json
output_bam_prefix: RP-929.NA12878.readgroup
ref_dict:
class: File
location: https://storage.googleapis.com/gcp-public-data--broad-references/hg38/v0/Homo_sapiens_assembly38.dict
ref_fasta:
class: File
path: Homo_sapiens_assembly38.fasta
location: https://storage.googleapis.com/gcp-public-data--broad-references/hg38/v0/Homo_sapiens_assembly38.fasta
ref_fasta_index:
class: File
path: Homo_sapiens_assembly38.fasta
location: https://storage.googleapis.com/gcp-public-data--broad-references/hg38/v0/Homo_sapiens_assembly38.fasta.fai
collect_gc_bias_metrics: False
preemptible_tries: 3
Binary file added wdl2cwl/tests/inputs/RP-929.NA12878.bai
Binary file not shown.
Binary file added wdl2cwl/tests/inputs/RP-929.NA12878.bam
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
chr20 10000846 10002407
chr20 10002520 10004171
chr20 10004273 10004964
chr20 10004994 10006386
chr20 10006409 10007800
chr20 10007824 10008018
chr20 10008043 10008079
chr20 10008100 10008707
chr20 10008808 10008897
chr20 10009002 10009791
chr20 10009933 10010531
Binary file not shown.
Binary file not shown.
Loading