Skip to content

Commit

Permalink
Update PipeVal (#81)
Browse files Browse the repository at this point in the history
* add sub-module pipeline-Nextflow-module

* add pipeval 3.0.0 in default.config

* add pipeval submodule from pipeline-Nextflow-module and modify input validation channel in main.nf

* Update CHANGELOG.md

* update pipeval version logging in main.nf

* udpate validation output dir naming convention in main.nf

* udpate validation output dir naming convention in main.nf

* Update CHANGELOG.md

* update main.nf

* update sub-module pipeline-Nextflow-module

* fix sha512sum command in sha512.nf

* change run_validate to run_validate_PipeVal in node configs

Co-authored-by: Mootor <mmootor@ip-0A125238.rhxrlfvjyzbupc03cc22jkch3c.xx.internal.cloudapp.net>
  • Loading branch information
Faizal-Eeman and Mootor authored Dec 9, 2022
1 parent 567164b commit 6ef3c28
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "external/pipeline-Nextflow-module"]
path = external/pipeline-Nextflow-module
url = [email protected]:uclahs-cds/pipeline-Nextflow-module.git
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ All notable changes to the call-gSV pipeline.
---

## [Unreleased]
## Changed
### Changed
- Parameterize Docker registry
- Use `ghcr.io/uclahs-cds` as default registry

### Added
- Add PipeVal using `pipeline-Nextflow-module` to validate the input CSV file

### Removed
- Remove `module/validation.nf` as PipeVal sub-module is used

---

## [4.0.0] - 2022-08-17
Expand Down
2 changes: 1 addition & 1 deletion config/F16.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process {
withName: run_validate {
withName: run_validate_PipeVal {
cpus = 1
memory = 1.GB
}
Expand Down
2 changes: 1 addition & 1 deletion config/F2.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process {
withName: run_validate {
withName: run_validate_PipeVal {
cpus = 1
memory = 1.GB
}
Expand Down
2 changes: 1 addition & 1 deletion config/F32.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process {
withName: run_validate {
withName: run_validate_PipeVal {
cpus = 1
memory = 1.GB
}
Expand Down
2 changes: 1 addition & 1 deletion config/F72.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process {
withName: run_validate {
withName: run_validate_PipeVal {
cpus = 1
memory = 1.GB
}
Expand Down
2 changes: 1 addition & 1 deletion config/M64.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
process {
withName: run_validate {
withName: run_validate_PipeVal {
cpus = 1
memory = 1.GB
}
Expand Down
5 changes: 2 additions & 3 deletions config/default.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,15 @@ params {
bcftools_version = "1.15.1"
vcftools_version = "0.1.16"
rtgtools_version = "3.12"
validate_version = "2.1.5"
pipeval_version = "3.0.0"

// Docker tool versions
docker_image_delly = "${-> params.docker_container_registry}/delly:${params.delly_version}"
docker_image_bcftools = "${-> params.docker_container_registry}/bcftools:${params.bcftools_version}"
docker_image_manta = "${-> params.docker_container_registry}/manta:${params.manta_version}"
docker_image_rtgtools = "${-> params.docker_container_registry}/rtg-tools:${params.rtgtools_version}"
docker_image_vcftools = "${-> params.docker_container_registry}/vcftools:${params.vcftools_version}"
docker_image_validate = "${-> params.docker_container_registry}/validate:${params.validate_version}"

docker_image_validate = "${-> params.docker_container_registry}/pipeval:${params.pipeval_version}"
}

process {
Expand Down
1 change: 1 addition & 0 deletions external/pipeline-Nextflow-module
27 changes: 23 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ Current Configuration:
bcftools: ${params.bcftools_version}
vcftools: ${params.vcftools_version}
rtgtools: ${params.rtgtools_version}
validation tool: ${params.validate_version}
validation tool: ${params.pipeval_version}
------------------------------------
Starting workflow...
------------------------------------
"""
.stripIndent()

include { run_validate } from './module/validation'
include { run_validate_PipeVal } from './external/pipeline-Nextflow-module/modules/PipeVal/validate/main.nf' addParams(
options: [ docker_image_version: params.pipeval_version ]
)
include { call_gSV_Delly; call_gCNV_Delly; regenotype_gSV_Delly; regenotype_gCNV_Delly } from './module/delly'
include { call_gSV_Manta } from './module/manta'
include { convert_BCF2VCF_BCFtools as convert_gSV_BCF2VCF_BCFtools; convert_BCF2VCF_BCFtools as convert_gCNV_BCF2VCF_BCFtools } from './module/bcftools'
Expand Down Expand Up @@ -101,14 +103,31 @@ if (!params.run_delly && !params.run_manta) {

reference_fasta_index = "${params.reference_fasta}.fai"

validation_channel = Channel
/**
* Create input_validation to validate the input bams
*/
validation_mode = Channel.of("file-input")

input_files = Channel
.fromPath(params.input_csv, checkIfExists:true)
.splitCsv(header:true)
.map{ row -> [row.input_bam, "${row.input_bam}.bai"]}
.flatten()

validation_mode
.combine(input_files)
.set { input_validation }

workflow {
run_validate(validation_channel)
/**
* Validate the input bams
*/
run_validate_PipeVal(input_validation)
// Collect and store input validation output
run_validate_PipeVal.out.validation_result.collectFile(
name: 'input_validation.txt',
storeDir: "${params.output_dir}/validation/run_validate_PipeVal"
)

if (params.run_discovery) {
if (params.run_manta) {
Expand Down
2 changes: 1 addition & 1 deletion module/sha512.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ process run_sha512sum {

"""
set -euo pipefail
python -m validate -t sha512-gen $input_checksum_file > ${input_checksum_file}.sha512
sha512sum ${input_checksum_file} > ${input_checksum_file}.sha512
"""
}
35 changes: 0 additions & 35 deletions module/validation.nf

This file was deleted.

0 comments on commit 6ef3c28

Please sign in to comment.