Skip to content

Commit

Permalink
Fix busco channels and namespace in summary script
Browse files Browse the repository at this point in the history
  • Loading branch information
dialvarezs committed Dec 16, 2024
1 parent abc1760 commit a44eb56
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/combine_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def main(args=None):
bins = results["bin"].sort_values().reset_index(drop=True)

if args.binqc_summary and args.binqc_tool == "busco":
busco_results = pd.read_csv(args.busco_summary, sep="\t")
busco_results = pd.read_csv(args.binqc_summary, sep="\t")
busco_bins = set(busco_results["Input_file"])

if set(bins) != busco_bins and len(busco_bins.intersection(set(bins))) > 0:
Expand Down
11 changes: 6 additions & 5 deletions subworkflows/local/bin_qc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,20 @@ workflow BIN_QC {
if (ch_busco_db.getSimpleName().contains('odb')) {
busco_lineage = ch_busco_db.getSimpleName()
}
busco_db = BUSCO_UNTAR.out.untar.map { it[1] }
ch_busco_db = BUSCO_UNTAR.out.untar.map { it[1] }
}
else if (busco_db.isDirectory()) {
if (busco_db.name.matches(/odb\d+$/)) {
busco_lineage = busco_db.name
else if (ch_busco_db.isDirectory()) {
if (ch_busco_db.name.matches(/odb\d+$/)) {
busco_lineage = ch_busco_db.name
}
}
}

BUSCO_BUSCO(ch_bins, 'genome', busco_lineage, busco_db, [])
BUSCO_BUSCO(ch_bins, 'genome', busco_lineage, ch_busco_db, [])

COMBINE_BINQC_TSV(BUSCO_BUSCO.out.batch_summary.map { it[1] }.collect())

qc_summary = COMBINE_BINQC_TSV.out.combined
ch_versions = ch_versions.mix(
BUSCO_BUSCO.out.versions.first(),
COMBINE_BINQC_TSV.out.versions
Expand Down

0 comments on commit a44eb56

Please sign in to comment.