Skip to content

Commit 58e4a0b

Browse files
committed
update report, sort version issues. rebase after this
1 parent 03dd303 commit 58e4a0b

8 files changed

Lines changed: 16 additions & 7 deletions

File tree

assets/report/functions/read_busco.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ read_busco_batch <- \(x) {read_tsv(x, show_col_types = F) %>%
7575
str_detect(x, "pilon") ~ "pilon",
7676
str_detect(x, "longstitch") ~ "longstitch",
7777
str_detect(x, "links") ~ "LINKS",
78+
str_detect(x, "yahs") ~ "HiC",
7879
str_detect(x, "assembl[ey]") ~ "Assembly",
7980
),
8081
Percent_gaps = Percent_gaps %>% str_remove("%") %>% as.numeric) %>%

assets/report/scripts/_busco_page.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ for (i in 1:length(unique(busco_reports$group))) {
1111
dplyr::select(sample, stage, Var, value) |>
1212
mutate(Var = str_replace_all(Var, "_", " ") |> str_replace_all("percent", "(%)")) |>
1313
pivot_wider(names_from = "Var", values_from = "value", id_cols = c(sample,stage)) |>
14-
dplyr::arrange(factor(stage, levels = c("Assembly","medaka", "pilon", "dorado","links","longstitch","ragtag")), sample) |>
14+
dplyr::arrange(factor(stage, levels = c("Assembly","medaka", "pilon", "dorado","hic","links","longstitch","ragtag")), sample) |>
1515
gt::gt() |>
1616
gt::fmt_auto() |>
1717
gt::opt_stylize(color = "gray") |>

assets/report/scripts/_merqury.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ merqury_stats <- list.files(paste0(data_base, "merqury"), full.names = T, patter
1313
str_detect(x, "_pilon") ~ "pilon",
1414
str_detect(x, "_longstitch") ~ "longstitch",
1515
str_detect(x, "_links") ~ "LINKS",
16+
str_detect(x, "_yahs") ~ "HiC",
1617
str_detect(x, "assembl[ey]") ~ "Assembly",
1718
TRUE ~ "Unknown")) }) |>
1819
bind_rows() |>

assets/report/scripts/_quast.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ quast_stats <- list.files(paste0(data_base, "quast"),
1818
str_detect(x, "_pilon") ~ "pilon",
1919
str_detect(x, "_longstitch") ~ "longstitch",
2020
str_detect(x, "_links") ~ "LINKS",
21+
str_detect(x, "_yahs") ~ "HiC",
2122
str_detect(x, "assembl[ey]") ~ "Assembly",
2223
TRUE ~ "Unknown")) }) |>
2324
left_join(groups, by = join_by(sample)) |>
24-
mutate(stage = stage |> fct_relevel("Assembly", "medaka", "pilon", "longstitch", "LINKS", "RagTag") ) |>
25+
mutate(stage = stage |> fct_relevel("Assembly", "medaka", "dorado", "pilon", "longstitch", "LINKS", "HiC", "RagTag") ) |>
2526
dplyr::arrange(sample, stage)
2627

2728
# This creates code that will generate the length plot based on the contents of the quast report.

conf/modules/QC/busco.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ process {
5555
]
5656
}
5757
withName: '.*:SCAFFOLD:.*HIC:QC.*:BUSCO' {
58-
ext.prefix = { "${meta.id}_hic-${lineage}" }
58+
ext.prefix = { "${meta.id}_yahs-${lineage}" }
5959
publishDir = [
6060
path: { "${params.outdir}/${meta.id}/QC/BUSCO/" },
6161
mode: params.publish_dir_mode,

conf/modules/QC/merqury.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ process {
4040
]
4141
}
4242
withName: '.*:SCAFFOLD:HIC:.*:MERQURY' {
43-
ext.prefix = { "${meta.id}_hic" }
43+
ext.prefix = { "${meta.id}_yahs" }
4444
publishDir = [
4545
path: { "${params.outdir}/${meta.id}/QC/merqury/" },
4646
mode: params.publish_dir_mode,

conf/modules/QC/quast.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ process {
4040
]
4141
}
4242
withName: '.*SCAFFOLD:HIC.*:QUAST' {
43-
ext.prefix = { "${meta.id}_hic" }
43+
ext.prefix = { "${meta.id}_yahs" }
4444
publishDir = [
4545
path: { "${params.outdir}/${meta.id}/QC/QUAST/" },
4646
mode: params.publish_dir_mode,

subworkflows/local/scaffolding/main.nf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,33 +172,39 @@ workflow SCAFFOLD {
172172
RUN_LINKS.out.busco_out.set { links_busco }
173173
RUN_LINKS.out.quast_out.set { links_quast }
174174
RUN_LINKS.out.merqury_report_files.set { links_merqury }
175-
176175
ch_versions = ch_versions.mix(RUN_LINKS.out.versions)
177176

178177
RUN_LONGSTITCH.out.busco_out.set { longstitch_busco }
179178
RUN_LONGSTITCH.out.quast_out.set { longstitch_quast }
180179
RUN_LONGSTITCH.out.merqury_report_files.set { longstitch_merqury }
181180
ch_versions = ch_versions.mix(RUN_LONGSTITCH.out.versions)
182181

182+
HIC.out.busco_out.set { hic_busco }
183+
HIC.out.quast_out.set { hic_quast }
184+
HIC.out.merqury_report_files.set { hic_merqury }
185+
ch_versions = ch_versions.mix(HIC.out.versions)
186+
183187
RUN_RAGTAG.out.busco_out.set { ragtag_busco }
184188
RUN_RAGTAG.out.quast_out.set { ragtag_quast }
185189
RUN_RAGTAG.out.merqury_report_files.set { ragtag_merqury }
186-
187190
ch_versions = ch_versions.mix(RUN_RAGTAG.out.versions)
188191

189192
links_busco
190193
.concat(longstitch_busco)
191194
.concat(ragtag_busco)
195+
.concat(hic_busco)
192196
.set { scaffold_busco_reports }
193197

194198
links_quast
195199
.concat(longstitch_quast)
196200
.concat(ragtag_quast)
201+
.concat(hic_quast)
197202
.set { scaffold_quast_reports }
198203

199204
links_merqury
200205
.concat(longstitch_merqury)
201206
.concat(ragtag_merqury)
207+
.concat(hic_merqury)
202208
.set { scaffold_merqury_reports }
203209

204210
versions = ch_versions

0 commit comments

Comments
 (0)