-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from sanger-tol/prepare_genome
Prepare genome subworkflow
- Loading branch information
Showing
10 changed files
with
300 additions
and
18 deletions.
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
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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ params { | |
input = null | ||
yaml = null | ||
align = false | ||
mask = false | ||
|
||
// Reference options | ||
fasta = null | ||
|
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,49 @@ | ||
// | ||
// Prepare genome for downstream processing | ||
// | ||
|
||
include { GUNZIP } from '../../modules/nf-core/gunzip/main' | ||
include { WINDOWMASKER_MKCOUNTS } from '../../modules/nf-core/windowmasker/mkcounts/main' | ||
include { WINDOWMASKER_USTAT } from '../../modules/nf-core/windowmasker/ustat/main' | ||
|
||
|
||
workflow PREPARE_GENOME { | ||
take: | ||
fasta // channel: [ meta, path(genome) ] | ||
|
||
|
||
main: | ||
ch_versions = Channel.empty() | ||
|
||
|
||
// | ||
// MODULE: Decompress FASTA file if needed | ||
// | ||
if ( params.fasta.endsWith('.gz') ) { | ||
ch_genome = GUNZIP ( fasta ).gunzip | ||
ch_versions = ch_versions.mix ( GUNZIP.out.versions ) | ||
} else { | ||
ch_genome = fasta | ||
} | ||
|
||
|
||
// | ||
// MODULES: Mask the genome if needed | ||
// | ||
if ( params.mask ) { | ||
WINDOWMASKER_MKCOUNTS ( ch_genome ) | ||
ch_versions = ch_versions.mix ( WINDOWMASKER_MKCOUNTS.out.versions ) | ||
|
||
WINDOWMASKER_USTAT ( WINDOWMASKER_MKCOUNTS.out.counts, ch_genome ) | ||
ch_versions = ch_versions.mix ( WINDOWMASKER_USTAT.out.versions ) | ||
|
||
ch_fasta = WINDOWMASKER_USTAT.out.intervals | ||
} else { | ||
ch_fasta = ch_genome | ||
} | ||
|
||
|
||
emit: | ||
genome = ch_fasta // channel: [ meta, path(genome) ] | ||
versions = ch_versions // channel: [ versions.yml ] | ||
} |
Oops, something went wrong.