Skip to content

Commit

Permalink
Renamed the variables to make the code easier to understand
Browse files Browse the repository at this point in the history
  • Loading branch information
muffato committed Jan 19, 2024
1 parent 864d3bc commit 4c27f52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subworkflows/local/busco_diamond_blastp.nf
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,19 @@ workflow BUSCO_DIAMOND {


// Index the lineages in the taxonomic order
def lineage_index = 0
def lineage_position = 0
ch_lineages
| map { lineage -> [lineage, lineage_index++] }
| map { lineage -> [lineage, lineage_position++] }
| set { ch_ordered_lineages }


// Order BUSCO results accoring to ch_lineages
// Order BUSCO results according to ch_ordered_lineages
BUSCO.out.full_table
| map { meta, table -> [table.parent.baseName.minus("run_"), meta, table] }
| join ( ch_ordered_lineages )
| map { lineage, meta, table, index -> [meta, table, index] }
| groupTuple()
| map { meta, tables, indexes -> [ meta, tables.withIndex().sort { a, b -> indexes[a[1]] <=> indexes[b[1]] } . collect { table, i -> table } ] }
| map { meta, tables, positions -> [ meta, tables.withIndex().sort { a, b -> positions[a[1]] <=> positions[b[1]] } . collect { table, i -> table } ] }
| set { ch_indexed_buscos }


Expand Down

0 comments on commit 4c27f52

Please sign in to comment.