-
Notifications
You must be signed in to change notification settings - Fork 529
Works with Nextflow.20.06.0 edge and has optional processes #244
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4bfc0f9
remove headers from help message
maxulysse b43b580
fix out issue with nextflow 20.06.0-edge
maxulysse bb39d07
commit all current changes
maxulysse ad51434
optional output
maxulysse bbd462b
trim_galore is optional too
maxulysse d492db4
use intervals
maxulysse 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -7,59 +7,74 @@ | |
| // And then initialize channels based on params or indexes that were just built | ||
|
|
||
| include { BUILD_INTERVALS } from '../local/build_intervals.nf' | ||
| include { BWAMEM2_INDEX as BWAMEM2_INDEX } from '../nf-core/bwamem2_index.nf' | ||
| include { GATK_CREATE_SEQUENCE_DICTIONARY as GATK_CREATE_SEQUENCE_DICTIONARY } from '../local/gatk_dict.nf' | ||
| include { BWAMEM2_INDEX } from '../nf-core/bwamem2_index.nf' | ||
| include { GATK_CREATE_SEQUENCE_DICTIONARY } from '../local/gatk_dict.nf' | ||
| include { | ||
| HTSLIB_TABIX as HTSLIB_TABIX_DBSNP; | ||
| HTSLIB_TABIX as HTSLIB_TABIX_GERMLINE_RESOURCE; | ||
| HTSLIB_TABIX as HTSLIB_TABIX_KNOWN_INDELS; | ||
| HTSLIB_TABIX as HTSLIB_TABIX_PON; | ||
| } from '../nf-core/htslib_tabix' | ||
| include { SAMTOOLS_FAIDX as SAMTOOLS_FAIDX } from '../nf-core/samtools_faidx.nf' | ||
| include { SAMTOOLS_FAIDX } from '../nf-core/samtools_faidx.nf' | ||
|
|
||
| workflow BUILD_INDICES{ | ||
| take: | ||
| ch_dbsnp | ||
| ch_fasta | ||
| ch_germline_resource | ||
| ch_known_indels | ||
| ch_pon | ||
| dbsnp | ||
| fasta | ||
| germline_resource | ||
| known_indels | ||
| pon | ||
| step | ||
|
|
||
| main: | ||
|
|
||
| if (!(params.bwa) && params.fasta && 'mapping' in step) | ||
| BWAMEM2_INDEX(ch_fasta) | ||
| if (!(params.bwa) && params.fasta && 'mapping' in step) | ||
| result_bwa = BWAMEM2_INDEX(fasta) | ||
| else | ||
| result_bwa = Channel.empty() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Glad it works like this, but unhappy with the optics
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll improve it at some point |
||
|
|
||
| if (!(params.dict) && params.fasta && !('annotate' in step) && !('controlfreec' in step)) | ||
| GATK_CREATE_SEQUENCE_DICTIONARY(ch_fasta) | ||
| result_dict = GATK_CREATE_SEQUENCE_DICTIONARY(fasta) | ||
| else | ||
| result_dict = Channel.empty() | ||
|
|
||
| if (!(params.fasta_fai) && params.fasta && !('annotate' in step)) | ||
| SAMTOOLS_FAIDX(ch_fasta) | ||
| result_fai = SAMTOOLS_FAIDX(fasta) | ||
| else | ||
| result_fai = Channel.empty() | ||
|
|
||
| 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) | ||
|
|
||
| result_dbsnp_tbi = HTSLIB_TABIX_DBSNP(dbsnp) | ||
| else | ||
| result_dbsnp_tbi = Channel.empty() | ||
|
|
||
| if (!(params.germline_resource_index) && params.germline_resource && 'mutect2' in tools) | ||
| HTSLIB_TABIX_GERMLINE_RESOURCE(ch_germline_resource) | ||
|
|
||
| result_germline_resource_tbi = HTSLIB_TABIX_GERMLINE_RESOURCE(germline_resource) | ||
| else | ||
| result_germline_resource_tbi = Channel.empty() | ||
|
|
||
| if (!(params.known_indels_index) && params.known_indels && ('mapping' in step || 'preparerecalibration' in step)) | ||
| HTSLIB_TABIX_KNOWN_INDELS(ch_known_indels) | ||
| result_known_indels_tbi = HTSLIB_TABIX_KNOWN_INDELS(known_indels) | ||
| else | ||
| result_known_indels_tbi = Channel.empty() | ||
|
|
||
| if (!(params.pon_index) && params.pon && ('tnscope' in tools || 'mutect2' in tools)) | ||
| HTSLIB_TABIX_PON(ch_pon) | ||
| result_pon_tbi = HTSLIB_TABIX_PON(pon) | ||
| else | ||
| result_pon_tbi = Channel.empty() | ||
|
|
||
| if (!(params.intervals) && !('annotate' in step) && !('controlfreec' in step)) { | ||
| BUILD_INTERVALS(SAMTOOLS_FAIDX.out) | ||
| } | ||
| if (!(params.intervals) && !('annotate' in step) && !('controlfreec' in step)) | ||
| result_intervals = BUILD_INTERVALS(SAMTOOLS_FAIDX.out) | ||
| else | ||
| result_intervals = Channel.empty() | ||
|
|
||
| emit: | ||
| bwa_built = BWAMEM2_INDEX.out | ||
| dbsnp_tbi = HTSLIB_TABIX_DBSNP.out | ||
| dictBuilt = GATK_CREATE_SEQUENCE_DICTIONARY.out | ||
| fai_built = SAMTOOLS_FAIDX.out | ||
| germline_resource_tbi = HTSLIB_TABIX_GERMLINE_RESOURCE.out | ||
| intervalBuilt = BUILD_INTERVALS.out | ||
| known_indels_tbi = HTSLIB_TABIX_KNOWN_INDELS.out | ||
| pon_tbi = HTSLIB_TABIX_PON.out | ||
| bwa = result_bwa | ||
| dbsnp_tbi = result_dbsnp_tbi | ||
| dict = result_dict | ||
| fai = result_fai | ||
| germline_resource_tbi = result_germline_resource_tbi | ||
| intervals = result_intervals | ||
| known_indels_tbi = result_known_indels_tbi | ||
| pon_tbi = result_pon_tbi | ||
| } | ||
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.
Why is this removed?
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.
Moved it back to the top, and just removed the Headers part from it, I think it's useless in the help context