-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add entry to download references (#38)
* feat: Add the download entry to the pipeline * docs: Add params for the download entry * fix: Remove requirement for input and kaiju_db * fix: Remove check for input in workflowmain * fix: Declare euryale after download * fix: Change location for checking input --------- Signed-off-by: jvfe <[email protected]>
- Loading branch information
Showing
11 changed files
with
201 additions
and
27 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
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
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,25 @@ | ||
process DOWNLOAD { | ||
tag "$id" | ||
|
||
label 'process_single' | ||
label 'error_retry_delay' | ||
|
||
input: | ||
val id | ||
val url | ||
|
||
output: | ||
path "${prefix}", emit: db | ||
|
||
script: | ||
prefix = task.ext.prefix ?: "${id}" | ||
|
||
""" | ||
wget -O ${prefix} $url | ||
""" | ||
|
||
stub: | ||
""" | ||
touch ${prefix} | ||
""" | ||
} |
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,45 @@ | ||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
VALIDATE INPUTS | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
*/ | ||
|
||
def summary_params = NfcoreSchema.paramsSummaryMap(workflow, params) | ||
|
||
// Validate input parameters | ||
WorkflowEuryale.initialise(params, log) | ||
|
||
/* | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
IMPORT LOCAL MODULES/SUBWORKFLOWS | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
*/ | ||
|
||
// | ||
// MODULES | ||
// | ||
|
||
include { DOWNLOAD as DOWNLOAD_FUNCTIONAL_DB } from '../modules/local/download/main' | ||
include { DOWNLOAD as DOWNLOAD_FUNCTIONAL_DICT } from '../modules/local/download/main' | ||
include { DOWNLOAD as DOWNLOAD_KAIJU } from '../modules/local/download/main' | ||
include { DOWNLOAD as DOWNLOAD_KRAKEN } from '../modules/local/download/main' | ||
include { DOWNLOAD as DOWNLOAD_HOST } from '../modules/local/download/main' | ||
|
||
workflow DOWNLOAD { | ||
if (params.download_functional) { | ||
DOWNLOAD_FUNCTIONAL_DB("reference_fasta.fa.gz", params.functional_db) | ||
DOWNLOAD_FUNCTIONAL_DICT("id_mapping.tab.gz", params.functional_dictionary) | ||
} | ||
|
||
if (params.download_kaiju) { | ||
DOWNLOAD_KAIJU("kaiju_db.tar.gz", params.kaiju_db_url) | ||
} | ||
|
||
if (params.download_kraken) { | ||
DOWNLOAD_KRAKEN("kraken2_db.tar.gz", params.kraken2_db_url) | ||
} | ||
|
||
if (params.download_host) { | ||
DOWNLOAD_HOST("host_fasta.fa.gz", params.host_url) | ||
} | ||
} |
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