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

Add VCF QC #522

Merged
merged 12 commits into from
Apr 21, 2022
31 changes: 31 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,37 @@ process{
ext.prefix = {"${meta.id}.somatic_snvs"}
}

// VCF QC
withName: 'BCFTOOLS_STATS'{
ext.when = { !(params.skip_tools && params.skip_tools.contains('bcftools')) }
ext.prefix = { "${meta.variantcaller}_${vcf.baseName.minus(".vcf")}" }
FriederikeHanssen marked this conversation as resolved.
Show resolved Hide resolved
FriederikeHanssen marked this conversation as resolved.
Show resolved Hide resolved
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/bcftools" },
]
}
//"${meta.id}".concat('.').concat(reads.get(0).name.findAll(/part_([0-9]+)?/).last())

withName: 'VCFTOOLS_.*'{
ext.when = { !(params.skip_tools && params.skip_tools.contains('vcftools')) }
ext.prefix = { "${vcf.baseName}" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/reports/vcftools" },
]
}

withName: 'VCFTOOLS_TSTV_COUNT'{
ext.args = "--TsTv-by-count"
}

withName: 'VCFTOOLS_TSTV_QUAL'{
ext.args = "--TsTv-by-qual"
}

withName: 'VCFTOOLS_SUMMARY'{
ext.args = "--FILTER-summary"
}
}

//withName: 'GENOMICSDBIMPORT' {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions subworkflows/nf-core/vcf_qc.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion workflows/sarek.nf
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ include { TUMOR_ONLY_VARIANT_CALLING } from '../subworkflows
// Variant calling on tumor/normal pair
include { PAIR_VARIANT_CALLING } from '../subworkflows/local/pair_variant_calling'

include { VCF_QC } from '../subworkflows/nf-core/vcf_qc'

// Annotation
include { ANNOTATE } from '../subworkflows/local/annotate'

Expand Down Expand Up @@ -673,7 +675,7 @@ workflow SAREK {
chr_files,
mappability)

// Gather vcf files for annotation
// Gather vcf files for annotation and QC
vcf_to_annotate = Channel.empty()
vcf_to_annotate = vcf_to_annotate.mix(GERMLINE_VARIANT_CALLING.out.deepvariant_vcf)
vcf_to_annotate = vcf_to_annotate.mix(GERMLINE_VARIANT_CALLING.out.freebayes_vcf)
Expand All @@ -693,6 +695,9 @@ workflow SAREK {
ch_versions = ch_versions.mix(PAIR_VARIANT_CALLING.out.versions)
ch_versions = ch_versions.mix(TUMOR_ONLY_VARIANT_CALLING.out.versions)

//QC
VCF_QC(vcf_to_annotate, intervals_bed_combined)

// ANNOTATE
if (params.step == 'annotate') vcf_to_annotate = ch_input_sample

Expand Down