mirror of
https://github.com/MillironX/taxprofiler.git
synced 2024-11-22 08:59:55 +00:00
Adds PoC of untarring system
This commit is contained in:
parent
c7f022008c
commit
631c115e10
5 changed files with 22 additions and 11 deletions
|
@ -82,7 +82,7 @@ process {
|
|||
publishDir = [
|
||||
path: { "${params.outdir}/kraken2/${meta.db_name}" },
|
||||
mode: 'copy',
|
||||
pattern: '.{fastq.gz,txt}'
|
||||
pattern: '*.{fastq.gz,txt}'
|
||||
]
|
||||
ext.args = { "${meta.db_params}" }
|
||||
ext.when = params.run_kraken2
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
"git_sha": "20d8250d9f39ddb05dfb437603aaf99b5c0b2b41"
|
||||
},
|
||||
"untar": {
|
||||
"git_sha": "7ec09d0ef4df89617baacc9b2dafcddb7cd4b05a"
|
||||
"git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
4
modules/nf-core/modules/untar/main.nf
generated
4
modules/nf-core/modules/untar/main.nf
generated
|
@ -8,10 +8,10 @@ process UNTAR {
|
|||
'biocontainers/biocontainers:v1.2.0_cv1' }"
|
||||
|
||||
input:
|
||||
path archive
|
||||
tuple val(meta), path(archive)
|
||||
|
||||
output:
|
||||
path "$untar" , emit: untar
|
||||
tuple val(meta), path("$untar"), emit: untar
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
|
|
10
modules/nf-core/modules/untar/meta.yml
generated
10
modules/nf-core/modules/untar/meta.yml
generated
|
@ -10,11 +10,21 @@ tools:
|
|||
documentation: https://www.gnu.org/software/tar/manual/
|
||||
licence: ["GPL-3.0-or-later"]
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- archive:
|
||||
type: file
|
||||
description: File to be untar
|
||||
pattern: "*.{tar}.{gz}"
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- untar:
|
||||
type: file
|
||||
description:
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
//
|
||||
|
||||
include { DATABASE_CHECK } from '../../modules/local/database_check'
|
||||
include { UNTAR } from '../../modules/nf-core/modules/untar/main'
|
||||
|
||||
workflow DB_CHECK {
|
||||
take:
|
||||
|
@ -17,19 +18,19 @@ workflow DB_CHECK {
|
|||
.dump(tag: "db_split_csv_out")
|
||||
.map { create_db_channels(it) }
|
||||
.dump(tag: "db_channel_prepped")
|
||||
.set{ dbs }
|
||||
|
||||
|
||||
parsed_samplesheet
|
||||
.branch {
|
||||
untar: it[0]['db_path'].toString().endsWith(".tar.gz")
|
||||
untar: it[1].toString().endsWith(".tar.gz")
|
||||
skip: true
|
||||
}
|
||||
.set{ ch_dbs_for_untar }
|
||||
|
||||
// TODO Filter to only run UNTAR on DBs of tools actually using?
|
||||
// TODO make optional whether to save
|
||||
UNTAR ( ch_dbs_for_untar.untar )
|
||||
|
||||
ch_final_dbs = ch_dbs_for_untar.skip.mix( ch_dbs_untarred )
|
||||
ch_final_dbs = ch_dbs_for_untar.skip.mix( UNTAR.out.untar )
|
||||
|
||||
emit:
|
||||
dbs = ch_final_dbs // channel: [ val(meta), [ db ] ]
|
||||
|
|
Loading…
Reference in a new issue