Skip to content

Commit

Permalink
Update subworkflows/local/input_check.nf
Browse files Browse the repository at this point in the history
Co-authored-by: Matthieu Muffato <[email protected]>
  • Loading branch information
tkchafin and muffato authored Nov 19, 2024
1 parent 6399d0a commit 779ec64
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions subworkflows/local/input_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ workflow INPUT_CHECK {
ch_versions = ch_versions.mix( UNTAR.out.versions.first() )

// Join and format dbs
// NOTE: The conditional for blastp/x is needed because nf-core/untar doesn't seem to detect their type correctly
// NOTE: The conditional for blastp/x is needed because nf-core/untar puts the database in a directory
ch_databases = UNTAR.out.untar.concat( ch_dbs_for_untar.skip )
.map { meta, db -> [ meta + [id: db.baseName], db] }
.map { db_meta, db_path ->
if (db_meta.type in ["blastp", "blastx"]) {
def actual_file = db_path.isDirectory() ? file(db_path.toString() + "/${db_path.name}") : db_path
[db_meta, file(actual_file.toString())]
[db_meta, file(db_path.toString() + "/${db_path.name}", checkIfExists: true)]
} else {
[db_meta, db_path]
}
Expand Down

0 comments on commit 779ec64

Please sign in to comment.