-
Notifications
You must be signed in to change notification settings - Fork 404
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 Subworkflow Build_Indices for switch to DSL2 #238
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e87c4dd
bwamem2 is not working
FriederikeHanssen 97e07be
Add index subworkflow with bwamem2, samtools, gatk, htslib
FriederikeHanssen da2b677
Add intervals building
FriederikeHanssen a87e74c
Fix number of input channels for subworkflow build_indices
FriederikeHanssen 2f6e6ea
Move buidl indices to subworkflow folder
FriederikeHanssen 5c733b0
Fix relativ paths for include
FriederikeHanssen 573761d
Add OR to changelog
FriederikeHanssen 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
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 was deleted.
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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
================================================================================ | ||
BUILDING INDEXES | ||
================================================================================ | ||
*/ | ||
|
||
// And then initialize channels based on params or indexes that were just built | ||
|
||
|
||
include { HTSLIB_TABIX as HTSLIB_TABIX_DBSNP } from '../nf-core/htslib_tabix' | ||
include { HTSLIB_TABIX as HTSLIB_TABIX_GERMLINE_RESOURCE } from '../nf-core/htslib_tabix' | ||
include { HTSLIB_TABIX as HTSLIB_TABIX_KNOWN_INDELS } from '../nf-core/htslib_tabix' | ||
include { HTSLIB_TABIX as HTSLIB_TABIX_PON } from '../nf-core/htslib_tabix' | ||
include { BWAMEM2_INDEX as BWAMEM2_INDEX } from '../nf-core/bwamem2_index.nf' | ||
include { SAMTOOLS_FAIDX as SAMTOOLS_FAIDX } from '../nf-core/samtools_faidx.nf' | ||
include { GATK_CREATE_SEQUENCE_DICTIONARY as GATK_CREATE_SEQUENCE_DICTIONARY } from '../local/gatk_dict.nf' | ||
include { BUILD_INTERVALS } from '../local/build_intervals.nf' | ||
|
||
|
||
workflow BUILD_INDICES{ | ||
take: | ||
step | ||
ch_fasta | ||
ch_dbsnp | ||
ch_germline_resource | ||
ch_known_indels | ||
ch_pon | ||
|
||
main: | ||
|
||
if(!(params.bwa) && params.fasta && 'mapping' in step) | ||
BWAMEM2_INDEX(ch_fasta) | ||
|
||
if(!(params.dict) && params.fasta && !('annotate' in step) && !('controlfreec' in step)) | ||
GATK_CREATE_SEQUENCE_DICTIONARY(ch_fasta) | ||
|
||
if(!(params.fasta_fai) && params.fasta && !('annotate' in step)) | ||
SAMTOOLS_FAIDX(ch_fasta) | ||
|
||
if(!(params.dbsnp_index) && params.dbsnp && ('mapping' in step || 'preparerecalibration' in step || 'controlfreec' in tools || 'haplotypecaller' in tools || 'mutect2' in tools || 'tnscope' in tools)) | ||
HTSLIB_TABIX_DBSNP(ch_dbsnp) | ||
|
||
if(!(params.germline_resource_index) && params.germline_resource && 'mutect2' in tools) | ||
HTSLIB_TABIX_GERMLINE_RESOURCE(ch_germline_resource) | ||
|
||
if(!(params.known_indels_index) && params.known_indels && ('mapping' in step || 'preparerecalibration' in step)) | ||
HTSLIB_TABIX_KNOWN_INDELS(ch_known_indels) | ||
|
||
if(!(params.pon_index) && params.pon && ('tnscope' in tools || 'mutect2' in tools)) | ||
HTSLIB_TABIX_PON(ch_pon) | ||
|
||
if(!(params.intervals) && !('annotate' in step) && !('controlfreec' in step)){ | ||
ch_fai = params.fasta_fai ? Channel.value(file(params.fasta_fai)) : SAMTOOLS_FAIDX.out | ||
BUILD_INTERVALS(ch_fai) | ||
} | ||
|
||
|
||
emit: | ||
bwa_built = BWAMEM2_INDEX.out | ||
dictBuilt = GATK_CREATE_SEQUENCE_DICTIONARY.out | ||
fai_built = SAMTOOLS_FAIDX.out | ||
dbsnp_tbi = HTSLIB_TABIX_DBSNP.out | ||
germline_resource_tbi = HTSLIB_TABIX_GERMLINE_RESOURCE.out | ||
known_indels_tbi = HTSLIB_TABIX_KNOWN_INDELS.out | ||
pon_tbi = HTSLIB_TABIX_PON.out | ||
intervalBuilt = BUILD_INTERVALS.out | ||
|
||
} | ||
|
||
|
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.
Maybe move this line to DSL2 too, no?
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.
will do in the next PR coming :)