Skip to content

Commit

Permalink
sourmash - fix database channels
Browse files Browse the repository at this point in the history
  • Loading branch information
vmikk committed Oct 27, 2023
1 parent 84f31b2 commit 58c4207
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions subworkflows/local/profiling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,19 @@ workflow PROFILING {
it -> [ it[0].sample, it[0], it[1] ]
}.join(sourmash_sample_database)
.multiMap {
it ->
signatures: [ it[3], it[2] ]
db_path: it[4]
db: it[4] + "/sourmash-db.zip"
tax: it[4] + "/lineages.csv.gz"
input ->

// Get the database file names from the channel (e.g., ZIP and CSV.GZ)
def find_db = []
def find_tax = []

input.eachFileMatch( ~/.*\.zip$/ ) { find_db << it }
input.eachFileMatch( ~/.*\.csv(\.gz)?$/ ) { find_tax << it }

signatures: [ input[3], input[2] ]
db_path: input[4]
db: [find_db]
tax: [find_tax]
}

// ch_input_for_sourmash_gather.signatures.view()
Expand Down

0 comments on commit 58c4207

Please sign in to comment.