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

Update dnascope-module #422

Merged
merged 4 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion conf/modules/annotate_snvs.config
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ process {
withName: '.*ANNOTATE_SNVS:CHROMOGRAPH_REGIONS' {
ext.prefix = { "${meta6.id}_rohann_vcfanno_upd_regions_chromograph" }
ext.args = { '--euploid' }
ext.when = { !(workflow.profile.tokenize(',').intersect(['test', 'test_one_sample']).size() >= 1) || workflow.stubRun }
ext.when = { !(workflow.profile.tokenize(',').intersect(['test', 'test_one_sample', 'test_sentieon']).size() >= 1) || workflow.stubRun }
tag = {"${meta6.id}"}
publishDir = [
path: { "${params.outdir}/annotate_snv" },
Expand Down
7 changes: 3 additions & 4 deletions conf/modules/call_snv_sentieon.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ process {

withName: '.*CALL_SNV:CALL_SNV_SENTIEON:SENTIEON_DNASCOPE' {
ext.prefix = { "${meta.id}_dnascope" }
ext.args2 = { [
params.variant_type ? "--var_type ${params.variant_type}" : '',
params.pcr_amplification ? '' : "--pcr_indel_model NONE"
].join(" ") }
ext.args2 = {
params.variant_type ? "--var_type ${params.variant_type}" : ''
}
}

withName: '.*CALL_SNV:CALL_SNV_SENTIEON:SENTIEON_DNAMODELAPPLY' {
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/peddy_check.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
process {
withName: '.*:PEDDY_CHECK:PEDDY' {
// Peddy needs a bigger test set in order to run so we skip it for the two test profiles
ext.when = { !(workflow.profile.tokenize(',').intersect(['test', 'test_one_sample']).size() >= 1) || workflow.stubRun }
ext.when = { !(workflow.profile.tokenize(',').intersect(['test', 'test_one_sample', 'test_sentieon']).size() >= 1) || workflow.stubRun }
publishDir = [
path: { "${params.outdir}/peddy_check" },
mode: params.publish_dir_mode,
Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@
},
"sentieon/dnascope": {
"branch": "master",
"git_sha": "127edadc279e19da093fdd513926c6cdee82c306",
"git_sha": "4fb6fdc8046ec09cd30f92a2a252e9a0ba4a6309",
"installed_by": ["modules"]
},
"sentieon/readwriter": {
Expand Down
59 changes: 34 additions & 25 deletions modules/nf-core/sentieon/dnascope/main.nf

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

94 changes: 55 additions & 39 deletions modules/nf-core/sentieon/dnascope/meta.yml

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

12 changes: 6 additions & 6 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ params {
ml_model = ''

// Dnascope SNV calling
pcr_amplification = false
variant_type = 'snp,indel'
sentieon_dnascope_pcr_indel_model = 'CONSERVATIVE'
variant_type = 'snp,indel'

// MultiQC options
multiqc_config = null
multiqc_title = null
multiqc_logo = null
max_multiqc_email_size = '25.MB'
multiqc_config = null
multiqc_title = null
multiqc_logo = null
max_multiqc_email_size = '25.MB'
multiqc_methods_description = null

// Boilerplate options
Expand Down
11 changes: 7 additions & 4 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,13 @@
"fa_icon": "fas fa-align-center",
"description": "Interval in the reference that will be used in the software"
},
"pcr_amplification": {
"type": "boolean",
"description": "Indicates whether the sample library is amplified using PCR or not. Set to false for PCR Free samples.",
"fa_icon": "fas fa-toggle-on"
"sentieon_dnascope_pcr_indel_model": {
"type": "string",
"default": "CONSERVATIVE",
"fa_icon": "fas fa-bacon",
"description": "Option for selecting the PCR indel model used by Sentieon Dnascope.",
"help_text": "PCR indel model used to weed out false positive indels more or less aggressively. The possible MODELs are: NONE (used for PCR free samples), and HOSTILE, AGGRESSIVE and CONSERVATIVE, in order of decreasing aggressiveness. The default value is CONSERVATIVE.",
"pattern": "^(NONE|HOSTILE|AGGRESSIVE|CONSERVATIVE)(?<!,)$"
},
"variant_caller": {
"type": "string",
Expand Down
6 changes: 4 additions & 2 deletions subworkflows/local/call_snv.nf
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ include { GATK4_SELECTVARIANTS } from '../../modules/nf-core/gatk4/selectvariant

workflow CALL_SNV {
take:
ch_bam_bai // channel: [mandatory] [ val(meta), path(bam), path(bai) ]
ch_bam_bai // channel: [mandatory] [ val(meta), path(bam), path(bai) ]
ch_genome_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ]
ch_known_dbsnp // channel: [optional] [ val(meta), path(vcf) ]
ch_known_dbsnp_tbi // channel: [optional] [ val(meta), path(tbi) ]
ch_call_interval // channel: [mandatory] [ path(intervals) ]
ch_ml_model // channel: [mandatory] [ path(model) ]
ch_case_info // channel: [mandatory] [ val(case_info) ]
ch_pcr_indel_model // channel: [mandatory] [ val(sentieon_dnascope_pcr_indel_model) ]
asp8200 marked this conversation as resolved.
Show resolved Hide resolved

main:
ch_versions = Channel.empty()
Expand All @@ -38,7 +39,8 @@ workflow CALL_SNV {
ch_known_dbsnp_tbi,
ch_call_interval,
ch_ml_model,
ch_case_info
ch_case_info,
ch_pcr_indel_model
)

ch_vcf = Channel.empty().mix(CALL_SNV_DEEPVARIANT.out.vcf, CALL_SNV_SENTIEON.out.vcf)
Expand Down
37 changes: 26 additions & 11 deletions subworkflows/local/variant_calling/call_snv_sentieon.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,36 @@ include { BCFTOOLS_FILTER as BCF_FILTER_TWO } from '../../../modules/nf-c

workflow CALL_SNV_SENTIEON {
take:
ch_bam_bai // channel: [mandatory] [ val(meta), path(bam), path(bai) ]
ch_genome_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ]
ch_dbsnp // channel: [mandatory] [ val(meta), path(vcf) ]
ch_dbsnp_index // channel: [mandatory] [ val(meta), path(tbi) ]
ch_call_interval // channel: [mandatory] [ val(meta), path(interval) ]
ch_ml_model // channel: [mandatory] [ val(meta), path(model) ]
ch_case_info // channel: [mandatory] [ val(case_info) ]

ch_bam_bai // channel: [mandatory] [ val(meta), path(bam), path(bai) ]
ch_genome_fasta // channel: [mandatory] [ val(meta), path(fasta) ]
ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ]
ch_dbsnp // channel: [mandatory] [ val(meta), path(vcf) ]
ch_dbsnp_index // channel: [mandatory] [ val(meta), path(tbi) ]
ch_call_interval // channel: [mandatory] [ val(meta), path(interval) ]
ch_ml_model // channel: [mandatory] [ val(meta), path(model) ]
ch_case_info // channel: [mandatory] [ val(case_info) ]
ch_pcr_indel_model // channel: [mandatory] [ val(sentieon_dnascope_pcr_indel_model) ]
asp8200 marked this conversation as resolved.
Show resolved Hide resolved
main:
ch_versions = Channel.empty()

SENTIEON_DNASCOPE ( ch_bam_bai, ch_genome_fasta, ch_genome_fai, ch_dbsnp, ch_dbsnp_index, ch_call_interval, ch_ml_model )
// Combine bam and intervals
bam_bai_intervals = ch_bam_bai.combine(ch_call_interval)
.map{
meta, bam, bai, meta2, interval -> [meta, bam, bai, interval]
}

ch_dnamodelapply_in = SENTIEON_DNASCOPE.out.vcf.join(SENTIEON_DNASCOPE.out.index)
SENTIEON_DNASCOPE(
bam_bai_intervals,
ch_genome_fasta,
ch_genome_fai,
ch_dbsnp,
ch_dbsnp_index,
ch_ml_model,
ch_pcr_indel_model,
'VARIANT',
false)

ch_dnamodelapply_in = SENTIEON_DNASCOPE.out.vcf.join(SENTIEON_DNASCOPE.out.vcf_tbi)

SENTIEON_DNAMODELAPPLY ( ch_dnamodelapply_in, ch_genome_fasta, ch_genome_fai, ch_ml_model )

Expand Down
3 changes: 2 additions & 1 deletion workflows/raredisease.nf
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ workflow RAREDISEASE {
ch_dbsnp_tbi,
ch_call_interval,
ch_ml_model,
ch_case_info
ch_case_info,
Channel.value(params.sentieon_dnascope_pcr_indel_model)
)
ch_versions = ch_versions.mix(CALL_SNV.out.versions)

Expand Down