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 module bcftools/norm to sarek (in progress) #1483

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 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
12 changes: 12 additions & 0 deletions conf/modules/post_variant_calling.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@

process {

withName: 'GERMLINE_VCFS_NORM'{
ext.args = { [
'--multiallelics - both', //split multiallelic sites into biallelic records and both SNPs and indels should be merged separately into two records
'--rm-dup all' //output only the first instance of a record which is present multiple times
].join(' ') }
ext.when = { params.concatenate_vcfs }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we expand this to all vcfs

publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/concat/${meta.id}/" }
]
}

withName: 'GERMLINE_VCFS_CONCAT'{
ext.args = { "-a" }
ext.when = { params.concatenate_vcfs }
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/bcftools/norm/environment.yml

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

60 changes: 60 additions & 0 deletions modules/nf-core/bcftools/norm/main.nf

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

61 changes: 61 additions & 0 deletions modules/nf-core/bcftools/norm/meta.yml

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

1 change: 1 addition & 0 deletions subworkflows/local/post_variantcalling/main.nf
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I've tried an approach, but now I've got a new error:
Process NFCORE_SAREK:SAREK:POST_VARIANTCALLING:CONCATENATE_GERMLINE_VCFS:GERMLINE_VCFS_NORM declares 2 input channels but 1 were specified

-- Check script './workflows/sarek/../../subworkflows/local/post_variantcalling/../vcf_concatenate_germline/main.nf' at line: 27 or see '.nextflow.log' file for more details

I've never done groovy, I think I've broken everything or maybe I'm making it too complex ^^'

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ workflow POST_VARIANTCALLING {

take:
vcfs
fasta
concatenate_vcfs

main:
Expand Down
6 changes: 6 additions & 0 deletions subworkflows/local/vcf_concatenate_germline/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// Concatenation of germline vcf-files
include { ADD_INFO_TO_VCF } from '../../../modules/local/add_info_to_vcf/main'
include { TABIX_BGZIPTABIX as TABIX_EXT_VCF } from '../../../modules/nf-core/tabix/bgziptabix/main'
include { BCFTOOLS_NORM as GERMLINE_VCFS_NORM } from '../../../modules/nf-core/bcftools/norm/main'
include { BCFTOOLS_CONCAT as GERMLINE_VCFS_CONCAT } from '../../../modules/nf-core/bcftools/concat/main'
include { BCFTOOLS_SORT as GERMLINE_VCFS_CONCAT_SORT } from '../../../modules/nf-core/bcftools/sort/main'
include { TABIX_TABIX as TABIX_GERMLINE_VCFS_CONCAT_SORT } from '../../../modules/nf-core/tabix/tabix/main'
Expand All @@ -13,10 +14,14 @@ workflow CONCATENATE_GERMLINE_VCFS {

take:
vcfs
fasta

main:
versions = Channel.empty()

// Normalize vcf-files (added by jcdelmas 240415)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have a section in the readme collecting all contributors for more visibility. Just add yourself there 🙂 : https://github.com/nf-core/sarek/#credits

GERMLINE_VCFS_NORM(germline_vcfs_with_tbis, fasta)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be causing your error. The germline_vcfs+with_tbis is defined further down


// Concatenate vcf-files
ADD_INFO_TO_VCF(vcfs)
TABIX_EXT_VCF(ADD_INFO_TO_VCF.out.vcf)
Expand All @@ -31,6 +36,7 @@ workflow CONCATENATE_GERMLINE_VCFS {
// Gather versions of all tools used
versions = versions.mix(ADD_INFO_TO_VCF.out.versions)
versions = versions.mix(TABIX_EXT_VCF.out.versions)
versions = versions.mix(GERMLINE_VCFS_NORM.out.versions)
versions = versions.mix(GERMLINE_VCFS_CONCAT.out.versions)
versions = versions.mix(GERMLINE_VCFS_CONCAT.out.versions)
Copy link
Contributor

@asp8200 asp8200 Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
versions = versions.mix(GERMLINE_VCFS_CONCAT.out.versions)
versions = versions.mix(GERMLINE_VCFS_CONCAT_SORT.out.versions)

That seems like a copy-paste bug. Probably my bad

versions = versions.mix(TABIX_GERMLINE_VCFS_CONCAT_SORT.out.versions)
Expand Down
2 changes: 1 addition & 1 deletion workflows/sarek/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ workflow SAREK {

// POST VARIANTCALLING
POST_VARIANTCALLING(BAM_VARIANT_CALLING_GERMLINE_ALL.out.vcf_all,
params.concatenate_vcfs)
fasta, params.concatenate_vcfs)
JC-Delmas marked this conversation as resolved.
Show resolved Hide resolved

// Gather vcf files for annotation and QC
vcf_to_annotate = Channel.empty()
Expand Down
Loading