-
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 the download entry to the pipeline
Signed-off-by: jvfe <[email protected]>
- Loading branch information
Showing
8 changed files
with
187 additions
and
10 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
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) | ||
} | ||
} |