-
Notifications
You must be signed in to change notification settings - Fork 405
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
JC-Delmas
wants to merge
14
commits into
nf-core:dev
Choose a base branch
from
JC-Delmas:sarek_bcftools_norm
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
4772da1
First modification to contribute to the bcftools/norm module in Sarek
JC-Delmas 451aaec
Changes in the GERMLINE_VCFS_NORM process
JC-Delmas d97726b
Add fasta argument to POST_VARIANTCALLING process.
JC-Delmas e034ff0
add fasta input as argument
JC-Delmas 8469832
remove vcfs in the GERMLINE_VCFS_NORM process, replaced by germline_v…
JC-Delmas e885888
First modification to contribute to the bcftools/norm module in Sarek
JC-Delmas 9e94a05
Changes in the GERMLINE_VCFS_NORM process
JC-Delmas 2bdba7e
Add fasta argument to POST_VARIANTCALLING process.
JC-Delmas 1214f10
add fasta input as argument
JC-Delmas b7ba4f2
remove vcfs in the GERMLINE_VCFS_NORM process, replaced by germline_v…
JC-Delmas 34bf47b
Update workflows/sarek/main.nf
JC-Delmas 6dff9af
Resolved merge conflict by keeping changes from branch 34bf47baa9d61f…
JC-Delmas d289261
Refactor normalization and concatenation of VCF files
JC-Delmas c78af62
Modify and adjust two scripts to add normalization and integrate FAST…
JC-Delmas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,59 @@ | ||
// | ||
// CONCATENATE Germline VCFs | ||
// | ||
|
||
// 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_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' | ||
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' | ||
|
||
workflow CONCATENATE_GERMLINE_VCFS { | ||
|
||
take: | ||
vcfs | ||
fasta | ||
|
||
main: | ||
versions = Channel.empty() | ||
|
||
// Concatenate vcf-files | ||
// Add additional information to VCF files | ||
ADD_INFO_TO_VCF(vcfs) | ||
|
||
// Compress the VCF files with bgzip | ||
TABIX_EXT_VCF(ADD_INFO_TO_VCF.out.vcf) | ||
|
||
// Normalize the VCF files with BCFTOOLS_NORM | ||
GERMLINE_VCFS_NORM(vcf: ADD_INFO_TO_VCF.out.vcf, fasta: fasta) | ||
|
||
// Compress the normalized VCF files with bgzip | ||
TABIX_EXT_VCF(GERMLINE_VCFS_NORM.out.vcf) | ||
|
||
// Index the compressed normalized VCF files | ||
TABIX_GERMLINE_VCFS_CONCAT_SORT(TABIX_EXT_VCF.out.gz) | ||
|
||
// Gather vcfs and vcf-tbis for concatenating germline-vcfs | ||
germline_vcfs_with_tbis = TABIX_EXT_VCF.out.gz_tbi.map{ meta, vcf, tbi -> [ meta.subMap('id'), vcf, tbi ] }.groupTuple() | ||
germline_vcfs_with_tbis = TABIX_GERMLINE_VCFS_CONCAT_SORT.out.map { meta, vcf, tbi -> [meta.subMap('id'), vcf, tbi] }.groupTuple() | ||
|
||
// Concatenate the VCF files | ||
GERMLINE_VCFS_CONCAT(germline_vcfs_with_tbis) | ||
|
||
// Sort the concatenated VCF files | ||
GERMLINE_VCFS_CONCAT_SORT(GERMLINE_VCFS_CONCAT.out.vcf) | ||
|
||
// Index the sorted concatenated VCF files | ||
TABIX_GERMLINE_VCFS_CONCAT_SORT(GERMLINE_VCFS_CONCAT_SORT.out.vcf) | ||
|
||
// 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) | ||
versions = versions.mix(GERMLINE_VCFS_CONCAT_SORT.out.versions) | ||
versions = versions.mix(TABIX_GERMLINE_VCFS_CONCAT_SORT.out.versions) | ||
|
||
emit: | ||
vcfs = germline_vcfs_with_tbis // post processed vcfs | ||
|
||
vcfs = TABIX_GERMLINE_VCFS_CONCAT_SORT.out.gz_tbi // post-processed VCFs | ||
versions // channel: [ versions.yml ] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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