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

Sentieon-haplotyper and joint-germline with Sentieon Genotyper and VQSR #1007

Merged
merged 59 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f15ad55
WIP: Sentieon-haplotyper vcf-flow working. TO-DO: gvcf, joint-germeli…
asp8200 Apr 27, 2023
4d45b72
Merge branch 'sentieon' into sentieon_haplotyper
asp8200 Apr 27, 2023
c4343cf
Adding sentieon/dedup
asp8200 Apr 27, 2023
0f0e5d8
Adding sentieon/haplotyper
asp8200 Apr 27, 2023
a1803a5
Adding skip filter functionality for sentieon-haplotyper
asp8200 Apr 27, 2023
88606f9
Merge branch 'sentieon' into sentieon_haplotyper
asp8200 Apr 27, 2023
e38ca4f
Removing md5sum checks on TsTv.qual-files. Those files have unstable …
asp8200 Apr 28, 2023
ecc0da1
Changing option skip_haplotypecaller_filter to skip_haplotyper_filter…
asp8200 Apr 28, 2023
395b584
haplotypecaller -> haplotyper
asp8200 Apr 28, 2023
b520780
WIP: joint-germline with Sentieon
asp8200 May 2, 2023
58e88f5
Removing debug print statement
asp8200 May 2, 2023
72cb3f0
Adding tests for sentieon joint-germline
asp8200 May 2, 2023
22be85b
prettier
asp8200 May 2, 2023
607eb1f
Removing import of unused subworkflow BAM_MERGE_INDEX_SAMTOOLS
asp8200 May 2, 2023
eecde5f
Adding option sentieon_haplotyper_out_format
asp8200 May 3, 2023
da38969
Removing conversion of sentieon_haplotyper_out_format to value channel
asp8200 May 3, 2023
3cd76e3
Adding check for gvcf-files
asp8200 May 4, 2023
cfa1b84
Setting option sentieon_haplotyper_out_format to gvcf
asp8200 May 4, 2023
4651282
Adding some check for running joint_germline with sentieon_haplotyper
asp8200 May 4, 2023
58e1560
Fixing name of output gvcf-files
asp8200 May 4, 2023
c3b1a29
Adding tests for sentieon_haplotyper_skip_filter
asp8200 May 7, 2023
03280a5
Removing unstable md5 checks
asp8200 May 8, 2023
c92bc46
WIP: Setting up subworkflow for Sentieon-based joint-calling-germline
asp8200 May 8, 2023
c8adea8
Removing exception for Sentieon's haplotyper
asp8200 May 8, 2023
7cdf463
Adding tests for --sentieon_haplotyper_out_format gvcf
asp8200 May 8, 2023
2389593
Creating csv for gvcf-output from Sentieon haplotyper
asp8200 May 8, 2023
4633afa
Clean up
asp8200 May 8, 2023
56d3499
Adding pytest for both vcf and gvcf
asp8200 May 8, 2023
42a6b7c
Fixing md5sum
asp8200 May 8, 2023
b933707
WIP: Adding Sentieon's Genotyper for joint-germline genotyping
asp8200 May 9, 2023
4c11563
prettier
asp8200 May 9, 2023
09b60ee
Renamed the channel genotype_intervals to genotype_intervals_and_crams
asp8200 May 10, 2023
357952d
Renamed the channel genotype_intervals to genotype_intervals_and_crams
asp8200 May 10, 2023
d5502ef
Merge branch 'dev' into sentieon_haplotyper
asp8200 May 17, 2023
f8d6192
Adding the sentieon functions varcal and applyvarcal as local modules
asp8200 May 19, 2023
6c1c39f
Merge branch 'sentieon' into sentieon_haplotyper
asp8200 May 19, 2023
8f50852
Changing container nfcore/sentieon:202112.06 to docker.io/nfcore/sent…
asp8200 May 20, 2023
ac3f648
Merge branch 'sentieon_haplotyper' of https://github.com/nf-core/sare…
asp8200 May 20, 2023
12e7d8d
Removing comment
asp8200 May 20, 2023
2fbc6c9
Change local Sentieon gvcftyper module to nf-core version
asp8200 May 24, 2023
ef24e21
nf-core version of nf-module with Sentieons gvcftyper
asp8200 May 24, 2023
393ecff
Replacing local sentieon varcal module with nf-core version
asp8200 May 24, 2023
e1170ab
removing comment
asp8200 May 24, 2023
699bbf9
Removing argument dict from call to SENTIEON_VARCAL
asp8200 May 24, 2023
e5df910
Merge branch 'sentieon_haplotyper' of https://github.com/nf-core/sare…
asp8200 May 24, 2023
422fcee
Replacing local version of Sentieons applyvarcal module with nf-core …
asp8200 May 24, 2023
d00a208
Updating Sentieon modules from nf-core
asp8200 May 25, 2023
7efeeb6
Remove local version of applyvarcal
asp8200 May 25, 2023
71f5b05
Skipping singularity-based test for CI-test concatenate_vcfs
asp8200 May 25, 2023
6432638
Update nextflow_schema.json
asp8200 May 25, 2023
c8f544a
Undoing deletion
asp8200 May 25, 2023
c087897
cleaner
asp8200 May 25, 2023
4090e50
Renaming ch genotype_intervals_and_crams back to genotype_intervals
asp8200 May 25, 2023
0cda035
section for sentieon_joint_germline
asp8200 May 25, 2023
f4c0c40
Undoing the removal of samtools/convert/main.nf from markduplicates s…
asp8200 May 26, 2023
b674fbb
Changing tag joint_germline to sention_joint_germline
asp8200 May 26, 2023
ecb3f78
Update subworkflows/local/bam_variant_calling_haplotypecaller/main.nf
asp8200 May 26, 2023
a87d36c
Fix typo
asp8200 May 26, 2023
cc45a80
Merge branch 'sentieon_haplotyper' of https://github.com/nf-core/sare…
asp8200 May 26, 2023
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: 2 additions & 0 deletions .github/workflows/pytest-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
tags: concatenate_vcfs
- profile: "conda"
tags: sentieon/bwamem
- profile: "singularity"
tags: concatenate_vcfs
maxulysse marked this conversation as resolved.
Show resolved Hide resolved
- profile: "singularity"
tags: merge
- profile: "singularity"
Expand Down
6 changes: 3 additions & 3 deletions conf/modules/prepare_genome.config
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ process {
}

withName: 'TABIX_DBSNP' {
ext.when = { !params.dbsnp_tbi && params.dbsnp && ((params.step == "mapping" || params.step == "markduplicates" || params.step == "prepare_recalibration") || params.tools && (params.tools.split(',').contains('controlfreec') || params.tools.split(',').contains('haplotypecaller') || params.tools.split(',').contains('mutect2'))) }
ext.when = { !params.dbsnp_tbi && params.dbsnp && ((params.step == "mapping" || params.step == "markduplicates" || params.step == "prepare_recalibration") || params.tools && (params.tools.split(',').contains('controlfreec') || params.tools.split(',').contains('haplotypecaller') || params.tools.split(',').contains('sentieon_haplotyper') || params.tools.split(',').contains('mutect2'))) }
publishDir = [
enabled: (params.save_reference || params.build_only_index),
mode: params.publish_dir_mode,
Expand All @@ -96,7 +96,7 @@ process {
}

withName: 'TABIX_KNOWN_INDELS' {
ext.when = { !params.known_indels_tbi && params.known_indels && (params.step == 'mapping' || params.step == "markduplicates" || params.step == 'prepare_recalibration' || (params.tools && params.tools.split(',').contains('haplotypecaller')) ) }
ext.when = { !params.known_indels_tbi && params.known_indels && (params.step == 'mapping' || params.step == "markduplicates" || params.step == 'prepare_recalibration' || (params.tools && (params.tools.split(',').contains('haplotypecaller') || params.tools.split(',').contains('sentieon_haplotyper'))) ) }
publishDir = [
enabled: (params.save_reference || params.build_only_index),
mode: params.publish_dir_mode,
Expand All @@ -106,7 +106,7 @@ process {
}

withName: 'TABIX_KNOWN_SNPS' {
ext.when = { !params.known_snps_tbi && params.known_snps && (params.step == 'mapping' || params.step == "markduplicates" || params.step == 'prepare_recalibration' || (params.tools && params.tools.split(',').contains('haplotypecaller')) ) }
ext.when = { !params.known_snps_tbi && params.known_snps && (params.step == 'mapping' || params.step == "markduplicates" || params.step == 'prepare_recalibration' || (params.tools && (params.tools.split(',').contains('haplotypecaller') || params.tools.split(',').contains('sentieon_haplotyper'))) ) }
publishDir = [
enabled: (params.save_reference || params.build_only_index),
mode: params.publish_dir_mode,
Expand Down
85 changes: 85 additions & 0 deletions conf/modules/sentieon_haplotyper.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Config file for defining DSL2 per module options and publishing paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Available keys to override module options:
ext.args = Additional arguments appended to command in module.
ext.args2 = Second set of arguments appended to command in module (multi-tool modules).
ext.args3 = Third set of arguments appended to command in module (multi-tool modules).
ext.prefix = File name prefix for output files.
ext.when = When to run the module.
----------------------------------------------------------------------------------------
*/

// SENTIEON HAPLOTYPER

process {

withName: 'SENTIEON_HAPLOTYPER' {
// ext.args = { params.joint_germline ? "-ERC GVCF" : "" } // TO-DO: Change that
// ext.prefix = { meta.num_intervals <= 1 ? ( params.joint_germline ? "${meta.id}.haplotyper.g" : "${meta.id}.haplotyper" ) : ( params.joint_germline ? "${meta.id}.haplotyper.${intervals.simpleName}.g" :"${meta.id}.haplotyper.${intervals.simpleName}" ) } // old value
ext.prefix = { meta.num_intervals <= 1 ? "${meta.id}.haplotyper" : "${meta.id}.haplotyper.${intervals.simpleName}" }
ext.when = { params.tools && params.tools.split(',').contains('sentieon_haplotyper') }
publishDir = [
enabled: !params.joint_germline,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/"},
pattern: "*{vcf.gz,vcf.gz.tbi}",
saveAs: { meta.num_intervals > 1 ? null : "sentieon_haplotyper/${meta.id}/${it}" }
]
}

withName: 'MERGE_SENTIEON_HAPLOTYPER_VCFS' {
ext.prefix = { params.joint_germline ? "${meta.id}.haplotyper.g" : "${meta.id}.haplotyper.unfiltered" } // TO-DO: This shouldn't be relevant for gvcf. But check with the joint-germline flow.
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/sentieon_haplotyper/${meta.id}/" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}


withName: 'MERGE_SENTIEON_HAPLOTYPER_GVCFS' {
ext.prefix = { "${meta.id}.haplotyper.g" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/sentieon_haplotyper/${meta.id}/" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: '.*BAM_VARIANT_CALLING_SENTIEON_HAPLOTYPER:VCF_VARIANT_FILTERING_GATK:FILTERVARIANTTRANCHES' {
ext.prefix = {"${meta.id}.haplotyper"}
ext.args = { "--info-key CNN_1D" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/sentieon_haplotyper/${meta.id}/"},
pattern: "*{vcf.gz,vcf.gz.tbi}"
]
}

if (params.tools && params.tools.split(',').contains('haplotypecaller')) {
withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_GERMLINE_ALL:BAM_VARIANT_CALLING_HAPLOTYPECALLER:BAM_MERGE_INDEX_SAMTOOLS:(MERGE_BAM|INDEX_MERGE_BAM)' {
ext.prefix = { "${meta.id}.realigned" }
publishDir = [
enabled: true,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/haplotypecaller/${meta.id}/" },
pattern: "*{bam,bai}"
]
}
}

if (params.tools && params.tools.split(',').contains('sentieon_haplotyper')) {
withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_GERMLINE_ALL:BAM_VARIANT_CALLING_SENTIEON_HAPLOTYPER:BAM_MERGE_INDEX_SAMTOOLS:(MERGE_BAM|INDEX_MERGE_BAM)' {
ext.prefix = { "${meta.id}.realigned" }
publishDir = [
enabled: true,
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/sentieon_haplotyper/${meta.id}/" },
pattern: "*{bam,bai}"
]
}
}

}
84 changes: 84 additions & 0 deletions conf/modules/sentieon_joint_germline.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Config file for defining DSL2 per module options and publishing paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Available keys to override module options:
ext.args = Additional arguments appended to command in module.
ext.args2 = Second set of arguments appended to command in module (multi-tool modules).
ext.args3 = Third set of arguments appended to command in module (multi-tool modules).
ext.prefix = File name prefix for output files.
ext.when = When to run the module.
----------------------------------------------------------------------------------------
*/

// SENTIEON+GATK4 JOINT_GERMLINE // TO-DO: Figure out how much of this config is needed or wanted.

process {

withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_GERMLINE_ALL:BAM_JOINT_CALLING_GERMLINE_SENTIEON:GATK4_GENOMICSDBIMPORT' {
ext.args = { "--genomicsdb-shared-posixfs-optimizations true --bypass-feature-reader "}
ext.prefix = { "${meta.intervals_name}.joint" }
}

withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_GERMLINE_ALL:BAM_JOINT_CALLING_GERMLINE_SENTIEON:SENTIEON_GVCFTYPER' {
ext.args = { "--allow-old-rms-mapping-quality-annotation-data" }
ext.prefix = { meta.intervals_name }
}

if (params.tools && params.tools.contains('sentieon_haplotyper') && params.joint_germline) {
withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_GERMLINE_ALL:BAM_JOINT_CALLING_GERMLINE_SENTIEON::BCFTOOLS_SORT' {
ext.prefix = { "${vcf.baseName.minus("vcf")}sort" }
publishDir = [
enabled: false
]
}
}

withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_GERMLINE_ALL:BAM_JOINT_CALLING_GERMLINE_SENTIEON:MERGE_GENOTYPEGVCFS' {
ext.prefix = "joint_germline"
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/sentieon_haplotyper/joint_variant_calling/" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
pattern: "*{vcf.gz,vcf.gz.tbi}"
]
}

withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_GERMLINE_ALL:BAM_JOINT_CALLING_GERMLINE_SENTIEON:MERGE_VQSR' {
ext.prefix = "joint_germline_recalibrated"
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/sentieon_haplotyper/joint_variant_calling/"},
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
pattern: "*{vcf.gz,vcf.gz.tbi}"
]
}

withName: 'SENTIEON_VARCAL_INDEL' {
ext.prefix = { "${meta.id}_INDEL" }
ext.args = "--annotation QD --annotation MQRankSum --annotation ReadPosRankSum --annotation FS --annotation SOR --annotation DP --var_type INDEL"
publishDir = [
enabled: false
]
}

withName: 'SENTIEON_APPLYVARCAL_INDEL' {
ext.prefix = { "${meta.id}_INDEL" }
ext.args = '--sensitivity 99.9 --var_type INDEL'
}

withName: 'SENTIEON_VARCAL_SNP' {
ext.prefix = { "${meta.id}_SNP" }
ext.args = "--annotation QD --annotation MQRankSum --annotation ReadPosRankSum --annotation FS --annotation SOR --annotation DP --var_type SNP"
publishDir = [
enabled: false
]
}

withName: 'SENTIEON_APPLYVARCAL_SNP' {
ext.prefix = { "${meta.id}_SNP" }
ext.args = '--sensitivity 99.9 --var_type SNP'
}


}
24 changes: 22 additions & 2 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,34 @@
"git_sha": "371eff7748d769c2ddc8bd593773523a364a52fe",
"installed_by": ["modules"]
},
"sentieon/applyvarcal": {
"branch": "master",
"git_sha": "49a64392c75566394617a372d0fdd52caf754cfc",
"installed_by": ["modules"]
},
"sentieon/bwamem": {
"branch": "master",
"git_sha": "8c159ebb28cfa08890042a133bfab78de932eff7",
"git_sha": "b9829e1064382745d8dff7f1d74d2138d2864f71",
"installed_by": ["modules"]
},
"sentieon/dedup": {
"branch": "master",
"git_sha": "8c04ecc0c5d4ad102755b919b2525481f0380090",
"git_sha": "b9829e1064382745d8dff7f1d74d2138d2864f71",
"installed_by": ["modules"]
},
"sentieon/gvcftyper": {
"branch": "master",
"git_sha": "aa591ada04e79a771d242cd967648e6a1ae06ccf",
"installed_by": ["modules"]
},
"sentieon/haplotyper": {
"branch": "master",
"git_sha": "b9829e1064382745d8dff7f1d74d2138d2864f71",
"installed_by": ["modules"]
},
"sentieon/varcal": {
"branch": "master",
"git_sha": "641b422042e9d401d00f3e1a4f7ae59d53c9bfe0",
"installed_by": ["modules"]
},
"snpeff/download": {
Expand Down
56 changes: 56 additions & 0 deletions modules/nf-core/sentieon/applyvarcal/main.nf

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

74 changes: 74 additions & 0 deletions modules/nf-core/sentieon/applyvarcal/meta.yml

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

2 changes: 1 addition & 1 deletion modules/nf-core/sentieon/bwamem/main.nf

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

1 change: 1 addition & 0 deletions modules/nf-core/sentieon/bwamem/meta.yml

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

Loading
Loading