1
0
Fork 0
mirror of https://github.com/MillironX/taxprofiler.git synced 2024-11-10 22:23:10 +00:00

Adds PoC of untarring system

This commit is contained in:
James A. Fellows Yates 2022-03-21 14:58:19 +00:00
parent c7f022008c
commit 631c115e10
5 changed files with 22 additions and 11 deletions

View file

@ -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

View file

@ -25,7 +25,7 @@
"git_sha": "20d8250d9f39ddb05dfb437603aaf99b5c0b2b41"
},
"untar": {
"git_sha": "7ec09d0ef4df89617baacc9b2dafcddb7cd4b05a"
"git_sha": "e080f4c8acf5760039ed12ec1f206170f3f9a918"
}
}
}

View file

@ -8,19 +8,19 @@ process UNTAR {
'biocontainers/biocontainers:v1.2.0_cv1' }"
input:
path archive
tuple val(meta), path(archive)
output:
path "$untar" , emit: untar
path "versions.yml", emit: versions
tuple val(meta), path("$untar"), emit: untar
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
untar = archive.toString() - '.tar.gz'
untar = archive.toString() - '.tar.gz'
"""
tar \\
-xzvf \\

View file

@ -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:

View file

@ -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 ] ]