Skip to content

Commit

Permalink
Last fixes to get gtdb and bin summary working
Browse files Browse the repository at this point in the history
  • Loading branch information
dialvarezs committed Jan 8, 2025
1 parent 3d4ba8b commit d60ae40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion subworkflows/local/bin_qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ workflow BIN_QC {

// Combine QC summaries (same process for all tools)
CONCAT_BINQC_TSV(qc_summaries, 'tsv', 'tsv')
qc_summary = CONCAT_BINQC_TSV.out.csv
qc_summary = CONCAT_BINQC_TSV.out.csv.map { _meta, summary -> summary }
ch_versions = ch_versions.mix(CONCAT_BINQC_TSV.out.versions)

emit:
Expand Down
6 changes: 3 additions & 3 deletions subworkflows/local/gtdbtk.nf
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ workflow GTDBTK {
]

ch_bin_metrics = bin_qc_summary
.map { _meta, summary -> summary }
.splitCsv(header: true, sep: '\t')
.map { row -> qc_columns[params.binqc_tool].collect { col -> row[col] } }
.filter { row -> row[1] != '' }
.map { row ->
row = row[0] + row[1..2].collect { value -> Double.parseDouble(value) }
row = [row[0]] + row[1..2].collect { value -> Double.parseDouble(value) }
// CheckM / CheckM2 removes the .fa extension from the bin name
if (params.binqc_tool in ['checkm', 'checkm2']) {
row[1] = row[1] + '.fa'
row[0] = row[0] + '.fa'
}
row
}

// Filter bins based on collected metrics: completeness, contamination
Expand Down

0 comments on commit d60ae40

Please sign in to comment.