From 23a1ee14b285674348e7b2ab1a02d45ef90b1e7e Mon Sep 17 00:00:00 2001 From: pdimens Date: Tue, 23 Jul 2024 10:14:09 -0400 Subject: [PATCH 1/6] rm general stats page --- src/harpy/reports/leviathan.Rmd | 1 - src/harpy/reports/naibr.Rmd | 1 - 2 files changed, 2 deletions(-) diff --git a/src/harpy/reports/leviathan.Rmd b/src/harpy/reports/leviathan.Rmd index 210f3931b..97aaaa8e6 100644 --- a/src/harpy/reports/leviathan.Rmd +++ b/src/harpy/reports/leviathan.Rmd @@ -27,7 +27,6 @@ using<-function(...) { using("flexdashboard","dplyr","ggplot2","DT","BioCircos") ``` -# General Stats ## Intro ### introtext {.no-title} ```{r} diff --git a/src/harpy/reports/naibr.Rmd b/src/harpy/reports/naibr.Rmd index 03cdaa9b5..954bcb81f 100644 --- a/src/harpy/reports/naibr.Rmd +++ b/src/harpy/reports/naibr.Rmd @@ -23,7 +23,6 @@ fai <- snakemake@input[["fai"]] samplename <- gsub(".bedpe", "", basename(infile)) ``` -# General Stats ## file top ### file header {.no-title}

NAIBR Variant Calling: `r samplename`

From d4d72f9b2d1422d24963ab0fbacfa69f544a3f4a Mon Sep 17 00:00:00 2001 From: pdimens Date: Wed, 24 Jul 2024 13:12:04 -0400 Subject: [PATCH 2/6] add unique filenames for CSV exports --- src/harpy/reports/align_bxstats.Rmd | 2 +- src/harpy/reports/align_stats.Rmd | 8 ++++---- src/harpy/reports/bcftools_stats.Rmd | 15 +++++++++++++-- src/harpy/reports/hapcut.Rmd | 14 +++++++++++--- src/harpy/reports/leviathan.Rmd | 12 ++++++++++-- src/harpy/reports/leviathan_pop.Rmd | 18 +++++++++++++++--- src/harpy/reports/naibr.Rmd | 27 ++++++++++++++++++++------- src/harpy/reports/naibr_pop.Rmd | 24 ++++++++++++++++++++---- src/harpy/reports/preflight_bam.Rmd | 6 +++++- src/harpy/reports/preflight_fastq.Rmd | 6 +++++- src/harpy/reports/stitch_collate.Rmd | 6 +++++- 11 files changed, 109 insertions(+), 29 deletions(-) diff --git a/src/harpy/reports/align_bxstats.Rmd b/src/harpy/reports/align_bxstats.Rmd index c11ee90ea..968d3e5f0 100644 --- a/src/harpy/reports/align_bxstats.Rmd +++ b/src/harpy/reports/align_bxstats.Rmd @@ -128,7 +128,7 @@ DT::datatable( aggregate_df, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "per_sample_barcode_alignment")), scrollX = TRUE), caption = 'Per-Sample Alignment Information Pertaining to Barcodes', fillContainer = T, colnames = c("sample", "alignments", "unique molecules", "singletons", "multiplex", "unique barcodes", "molecule:bx ratio", "valid bx alignments", "invalid bx alignments", "% valid bx", "avg reads/molecule", "SEM reads/molecule", "avg molecule coverage %","SEM molecule coverage %", "N50", "N75","N90") diff --git a/src/harpy/reports/align_stats.Rmd b/src/harpy/reports/align_stats.Rmd index 33619a860..8e35ab6bc 100644 --- a/src/harpy/reports/align_stats.Rmd +++ b/src/harpy/reports/align_stats.Rmd @@ -110,7 +110,7 @@ valueBox(scales::comma(totuniqBX), caption = "Total unique molecules", color = " valids %>% group_by(contig) %>% summarize(n50 = NX(length_inferred, 50), n75 = NX(length_inferred, 75), n90 = NX(length_inferred, 90)) %>% - DT::datatable(rownames = F, options = list(dom = 'Brtip', buttons = c('csv')), fillContainer = T) + DT::datatable(rownames = F, options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "molecule_NX"))), fillContainer = T) ``` ## Reads per molecule dec @@ -446,7 +446,7 @@ DT::datatable( contig_avg, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "align_depth_avg")), scrollX = TRUE), colnames = c('Contig', 'Average Depth', 'Standard Deviation'), autoHideNavigation = T, fillContainer = T, @@ -460,7 +460,7 @@ DT::datatable( contig_avg_filt, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "align_depth_filt_avg")), scrollX = TRUE), colnames = c('Contig', 'Average Depth', 'Standard Deviation'), autoHideNavigation = T, fillContainer = T, @@ -474,7 +474,7 @@ DT::datatable( outliers, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "align_depth_outlier_avg")), scrollX = TRUE), colnames = c('Contig', 'Position', 'Depth'), autoHideNavigation = T, fillContainer = T diff --git a/src/harpy/reports/bcftools_stats.Rmd b/src/harpy/reports/bcftools_stats.Rmd index 0535aad76..db3bdba1b 100644 --- a/src/harpy/reports/bcftools_stats.Rmd +++ b/src/harpy/reports/bcftools_stats.Rmd @@ -255,7 +255,7 @@ if(sum(.dpL) == 0){ rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv')), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "align_depth_bins"))), colnames = c("Depth Bin", "Genotypes", "% Genotypes", "Sites", "% Sites") ) } @@ -317,7 +317,18 @@ figheight <- 1 + (0.2 * nrow(psc)) ## Individual Statistics {.tabset data-height=plotheight} ### Individual Data ```{r Individual table, echo=FALSE, message=FALSE, warning=FALSE} -DT::datatable(psc, rownames = F, fillContainer = T, filter = "top", extensions = 'Buttons', options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE, paging = F)) +DT::datatable( + psc, rownames = F, + fillContainer = T, + filter = "top", + extensions = 'Buttons', + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "snp_indiv_stats")), + scrollX = TRUE, + paging = F + ) +) ``` ### Individual Statistics diff --git a/src/harpy/reports/hapcut.Rmd b/src/harpy/reports/hapcut.Rmd index f778a309a..14ed501d2 100644 --- a/src/harpy/reports/hapcut.Rmd +++ b/src/harpy/reports/hapcut.Rmd @@ -179,10 +179,14 @@ DT::datatable( percontig, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "phasing_per_contig")), + scrollX = TRUE + ), colnames = c("Contig", "Total Haplotypes", "Mean SNPs", "Median SNPs", "Mean Haplotype Length", "Median Haplotype Length", "Largest Haplotype"), fillContainer = T - ) +) ``` ### per contig plot {.no-title} @@ -247,7 +251,11 @@ DT::datatable( persample, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "phasing_per_sample")), + scrollX = TRUE + ), colnames = c("Sample", "Haplotypes", "Mean SNPs", "Median SNPs", "Mean Haplotype Length", "Median Haplotype Length", "Largest Haplotype"), fillContainer = T ) diff --git a/src/harpy/reports/leviathan.Rmd b/src/harpy/reports/leviathan.Rmd index 97aaaa8e6..6d4f59024 100644 --- a/src/harpy/reports/leviathan.Rmd +++ b/src/harpy/reports/leviathan.Rmd @@ -126,7 +126,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "leviathan_sv")), + scrollX = TRUE + ), autoHideNavigation = T, fillContainer = T ) @@ -147,7 +151,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "leviathan_sv_summary")), + scrollX = TRUE + ), autoHideNavigation = T, fillContainer = T ) diff --git a/src/harpy/reports/leviathan_pop.Rmd b/src/harpy/reports/leviathan_pop.Rmd index 0d2339f4a..e8c6c8c05 100644 --- a/src/harpy/reports/leviathan_pop.Rmd +++ b/src/harpy/reports/leviathan_pop.Rmd @@ -137,7 +137,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "leviathan_sv")), + scrollX = TRUE + ), fillContainer = T ) ``` @@ -158,7 +162,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "leviathan_sv_count_pop")), + scrollX = TRUE + ), fillContainer = T ) ``` @@ -177,7 +185,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "leviathan_sv_bp_pop")), + scrollX = TRUE + ), fillContainer = T ) ``` diff --git a/src/harpy/reports/naibr.Rmd b/src/harpy/reports/naibr.Rmd index 954bcb81f..0be311a3e 100644 --- a/src/harpy/reports/naibr.Rmd +++ b/src/harpy/reports/naibr.Rmd @@ -144,8 +144,11 @@ DT::datatable( grpstats %>% pivot_wider(id_cols = 1, names_from = SV, values_from = count), rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), - #colnames = c('Contig', 'Variant Type', 'Count', 'Total Base Pairs'), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv_count")), + scrollX = TRUE + ), autoHideNavigation = T, fillContainer = T ) @@ -156,9 +159,11 @@ DT::datatable( grpstats %>% pivot_wider(id_cols = 1, names_from = SV, values_from = total_bp), rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), - #colnames = c('deletion', 'duplication', 'inversion'), - autoHideNavigation = T, + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv_count_bp")), + scrollX = TRUE + ), autoHideNavigation = T, fillContainer = T, ) ``` @@ -209,7 +214,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv")), + scrollX = TRUE + ), autoHideNavigation = T, fillContainer = T ) @@ -221,7 +230,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv_chimeric")), + scrollX = TRUE + ), autoHideNavigation = T, fillContainer = T ) diff --git a/src/harpy/reports/naibr_pop.Rmd b/src/harpy/reports/naibr_pop.Rmd index 0aa9da103..e44de493e 100644 --- a/src/harpy/reports/naibr_pop.Rmd +++ b/src/harpy/reports/naibr_pop.Rmd @@ -172,7 +172,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv_count_pop")), + scrollX = TRUE + ), fillContainer = T ) ``` @@ -189,7 +193,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv_count_bp")), + scrollX = TRUE + ), fillContainer = T ) ``` @@ -239,7 +247,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = 'csv', scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv")), + scrollX = TRUE + ), fillContainer = T ) ``` @@ -250,7 +262,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE) + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "naibr_sv_chimeric")), + scrollX = TRUE + ) ) ``` diff --git a/src/harpy/reports/preflight_bam.Rmd b/src/harpy/reports/preflight_bam.Rmd index ce78be154..fc2f81bba 100644 --- a/src/harpy/reports/preflight_bam.Rmd +++ b/src/harpy/reports/preflight_bam.Rmd @@ -133,7 +133,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = T), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "bam_checks")), + scrollX = T + ), fillContainer = T ) ``` diff --git a/src/harpy/reports/preflight_fastq.Rmd b/src/harpy/reports/preflight_fastq.Rmd index 27ce66e85..7fdd90d94 100644 --- a/src/harpy/reports/preflight_fastq.Rmd +++ b/src/harpy/reports/preflight_fastq.Rmd @@ -129,7 +129,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = T), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "fastq_checks")), + scrollX = T + ), fillContainer = T ) ``` diff --git a/src/harpy/reports/stitch_collate.Rmd b/src/harpy/reports/stitch_collate.Rmd index 4ea82ddc2..9efb9db28 100644 --- a/src/harpy/reports/stitch_collate.Rmd +++ b/src/harpy/reports/stitch_collate.Rmd @@ -145,7 +145,11 @@ DT::datatable( rownames = F, filter = "top", extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = c('csv'), scrollX = TRUE), + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = "impute_per_sample")), + scrollX = TRUE + ), autoHideNavigation = T, fillContainer = T ) From 45b95906b6dabb40fef0c50d6c611a619ddb42e3 Mon Sep 17 00:00:00 2001 From: pdimens Date: Wed, 24 Jul 2024 13:20:47 -0400 Subject: [PATCH 3/6] add sample names --- src/harpy/reports/align_stats.Rmd | 8 ++++---- src/harpy/reports/leviathan.Rmd | 4 ++-- src/harpy/reports/naibr.Rmd | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/harpy/reports/align_stats.Rmd b/src/harpy/reports/align_stats.Rmd index 8e35ab6bc..7e6df26ac 100644 --- a/src/harpy/reports/align_stats.Rmd +++ b/src/harpy/reports/align_stats.Rmd @@ -110,7 +110,7 @@ valueBox(scales::comma(totuniqBX), caption = "Total unique molecules", color = " valids %>% group_by(contig) %>% summarize(n50 = NX(length_inferred, 50), n75 = NX(length_inferred, 75), n90 = NX(length_inferred, 90)) %>% - DT::datatable(rownames = F, options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "molecule_NX"))), fillContainer = T) + DT::datatable(rownames = F, options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_molecule_NX")))), fillContainer = T) ``` ## Reads per molecule dec @@ -446,7 +446,7 @@ DT::datatable( contig_avg, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "align_depth_avg")), scrollX = TRUE), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_avg"))), scrollX = TRUE), colnames = c('Contig', 'Average Depth', 'Standard Deviation'), autoHideNavigation = T, fillContainer = T, @@ -460,7 +460,7 @@ DT::datatable( contig_avg_filt, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "align_depth_filt_avg")), scrollX = TRUE), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_filt_avg"))), scrollX = TRUE), colnames = c('Contig', 'Average Depth', 'Standard Deviation'), autoHideNavigation = T, fillContainer = T, @@ -474,7 +474,7 @@ DT::datatable( outliers, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "align_depth_outlier_avg")), scrollX = TRUE), + options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_outlier_avg")))), scrollX = TRUE), colnames = c('Contig', 'Position', 'Depth'), autoHideNavigation = T, fillContainer = T diff --git a/src/harpy/reports/leviathan.Rmd b/src/harpy/reports/leviathan.Rmd index 6d4f59024..cf2b0d4b0 100644 --- a/src/harpy/reports/leviathan.Rmd +++ b/src/harpy/reports/leviathan.Rmd @@ -128,7 +128,7 @@ DT::datatable( extensions = 'Buttons', options = list( dom = 'Brtip', - buttons = list(list(extend = "csv",filename = "leviathan_sv")), + buttons = list(list(extend = "csv",filename = paste0(samplename , "_sv_leviathan`"))), scrollX = TRUE ), autoHideNavigation = T, @@ -153,7 +153,7 @@ DT::datatable( extensions = 'Buttons', options = list( dom = 'Brtip', - buttons = list(list(extend = "csv",filename = "leviathan_sv_summary")), + buttons = list(list(extend = "csv",filename = paste0(samplename ,"_sv_leviathan_per_contig"))), scrollX = TRUE ), autoHideNavigation = T, diff --git a/src/harpy/reports/naibr.Rmd b/src/harpy/reports/naibr.Rmd index 0be311a3e..46a87e0bc 100644 --- a/src/harpy/reports/naibr.Rmd +++ b/src/harpy/reports/naibr.Rmd @@ -146,7 +146,7 @@ DT::datatable( extensions = 'Buttons', options = list( dom = 'Brtip', - buttons = list(list(extend = "csv",filename = "naibr_sv_count")), + buttons = list(list(extend = "csv",filename = paste0(samplename , "_sv_naibr_count"))), scrollX = TRUE ), autoHideNavigation = T, @@ -161,7 +161,7 @@ DT::datatable( extensions = 'Buttons', options = list( dom = 'Brtip', - buttons = list(list(extend = "csv",filename = "naibr_sv_count_bp")), + buttons = list(list(extend = "csv",filename = paste0(samplename , "_sv_naibr_count_bp"))), scrollX = TRUE ), autoHideNavigation = T, fillContainer = T, @@ -216,7 +216,7 @@ DT::datatable( extensions = 'Buttons', options = list( dom = 'Brtip', - buttons = list(list(extend = "csv",filename = "naibr_sv")), + buttons = list(list(extend = "csv",filename = paste0(samplename ,"_sv_naibr"))), scrollX = TRUE ), autoHideNavigation = T, @@ -232,7 +232,7 @@ DT::datatable( extensions = 'Buttons', options = list( dom = 'Brtip', - buttons = list(list(extend = "csv",filename = "naibr_sv_chimeric")), + buttons = list(list(extend = "csv",filename = paste0(samplename ,"_sv_naibr_chimeric"))), scrollX = TRUE ), autoHideNavigation = T, From dbab9c991be8671a84e1240420eb2fd4d0889cf8 Mon Sep 17 00:00:00 2001 From: pdimens Date: Wed, 24 Jul 2024 13:32:32 -0400 Subject: [PATCH 4/6] fixes --- src/harpy/reports/align_bxstats.Rmd | 6 +++++- src/harpy/reports/align_stats.Rmd | 27 +++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/harpy/reports/align_bxstats.Rmd b/src/harpy/reports/align_bxstats.Rmd index 968d3e5f0..b946de02c 100644 --- a/src/harpy/reports/align_bxstats.Rmd +++ b/src/harpy/reports/align_bxstats.Rmd @@ -128,7 +128,11 @@ DT::datatable( aggregate_df, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = "per_sample_barcode_alignment")), scrollX = TRUE), + options = list( + dom = 'Brtip', + scrollX = TRUE, + buttons = list(list(extend = "csv",filename = "per_sample_barcode_alignment")) + ), caption = 'Per-Sample Alignment Information Pertaining to Barcodes', fillContainer = T, colnames = c("sample", "alignments", "unique molecules", "singletons", "multiplex", "unique barcodes", "molecule:bx ratio", "valid bx alignments", "invalid bx alignments", "% valid bx", "avg reads/molecule", "SEM reads/molecule", "avg molecule coverage %","SEM molecule coverage %", "N50", "N75","N90") diff --git a/src/harpy/reports/align_stats.Rmd b/src/harpy/reports/align_stats.Rmd index 7e6df26ac..4aaf11e44 100644 --- a/src/harpy/reports/align_stats.Rmd +++ b/src/harpy/reports/align_stats.Rmd @@ -110,7 +110,14 @@ valueBox(scales::comma(totuniqBX), caption = "Total unique molecules", color = " valids %>% group_by(contig) %>% summarize(n50 = NX(length_inferred, 50), n75 = NX(length_inferred, 75), n90 = NX(length_inferred, 90)) %>% - DT::datatable(rownames = F, options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_molecule_NX")))), fillContainer = T) + DT::datatable( + rownames = F, + options = list( + dom = 'Brtip', + buttons = list(list(extend = "csv",filename = paste0(samplename ,"_molecule_NX"))) + ), + fillContainer = T + ) ``` ## Reads per molecule dec @@ -446,7 +453,11 @@ DT::datatable( contig_avg, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_avg"))), scrollX = TRUE), + options = list( + dom = 'Brtip', + scrollX = TRUE, + buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_avg"))) + ), colnames = c('Contig', 'Average Depth', 'Standard Deviation'), autoHideNavigation = T, fillContainer = T, @@ -460,7 +471,11 @@ DT::datatable( contig_avg_filt, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_filt_avg"))), scrollX = TRUE), + options = list( + dom = 'Brtip', + scrollX = TRUE, + buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_filt_avg"))) + ), colnames = c('Contig', 'Average Depth', 'Standard Deviation'), autoHideNavigation = T, fillContainer = T, @@ -474,7 +489,11 @@ DT::datatable( outliers, rownames = F, extensions = 'Buttons', - options = list(dom = 'Brtip', buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_outlier_avg")))), scrollX = TRUE), + options = list( + dom = 'Brtip', + scrollX = TRUE, + buttons = list(list(extend = "csv",filename = paste0(samplename ,"_align_depth_outlier_avg"))) + ), colnames = c('Contig', 'Position', 'Depth'), autoHideNavigation = T, fillContainer = T From 93222ab967f64ea9791b32d193def64799a4e347 Mon Sep 17 00:00:00 2001 From: pdimens Date: Wed, 24 Jul 2024 13:35:36 -0400 Subject: [PATCH 5/6] sentence case --- .deprecated/align-minimap.smk | 2 +- src/harpy/snakefiles/align_bwa.smk | 2 +- src/harpy/snakefiles/align_ema.smk | 2 +- src/harpy/snakefiles/align_strobealign.smk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.deprecated/align-minimap.smk b/.deprecated/align-minimap.smk index a10ca883f..478b851b2 100644 --- a/.deprecated/align-minimap.smk +++ b/.deprecated/align-minimap.smk @@ -62,7 +62,7 @@ rule genome_setup: container: None message: - "copying {input} to Genome/" + "Copying {input} to Genome/" shell: """ if (file {input} | grep -q compressed ) ;then diff --git a/src/harpy/snakefiles/align_bwa.smk b/src/harpy/snakefiles/align_bwa.smk index 4f2a54294..ed99b9f9e 100644 --- a/src/harpy/snakefiles/align_bwa.smk +++ b/src/harpy/snakefiles/align_bwa.smk @@ -62,7 +62,7 @@ rule genome_setup: container: None message: - "copying {input} to Genome/" + "Copying {input} to Genome/" shell: """ if (file {input} | grep -q compressed ) ;then diff --git a/src/harpy/snakefiles/align_ema.smk b/src/harpy/snakefiles/align_ema.smk index 3ac41f35b..71922e0f6 100644 --- a/src/harpy/snakefiles/align_ema.smk +++ b/src/harpy/snakefiles/align_ema.smk @@ -67,7 +67,7 @@ rule genome_setup: container: None message: - "copying {input} to Genome/" + "Copying {input} to Genome/" shell: """ if (file {input} | grep -q compressed ) ;then diff --git a/src/harpy/snakefiles/align_strobealign.smk b/src/harpy/snakefiles/align_strobealign.smk index 0d3786238..d6fb86f8e 100644 --- a/src/harpy/snakefiles/align_strobealign.smk +++ b/src/harpy/snakefiles/align_strobealign.smk @@ -64,7 +64,7 @@ rule genome_setup: container: None message: - "copying {input} to Genome/" + "Copying {input} to Genome/" shell: """ if (file {input} | grep -q compressed ) ;then From 940c12ce87c9e47d648e60f53052f18d63eec8c2 Mon Sep 17 00:00:00 2001 From: pdimens Date: Wed, 24 Jul 2024 13:59:25 -0400 Subject: [PATCH 6/6] snake_case --- .../snakefiles => .deprecated}/phase.bak.smk | 0 src/harpy/snakefiles/phase.smk | 36 +++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) rename {src/harpy/snakefiles => .deprecated}/phase.bak.smk (100%) diff --git a/src/harpy/snakefiles/phase.bak.smk b/.deprecated/phase.bak.smk similarity index 100% rename from src/harpy/snakefiles/phase.bak.smk rename to .deprecated/phase.bak.smk diff --git a/src/harpy/snakefiles/phase.smk b/src/harpy/snakefiles/phase.smk index a8af36a2e..980072908 100644 --- a/src/harpy/snakefiles/phase.smk +++ b/src/harpy/snakefiles/phase.smk @@ -22,10 +22,10 @@ bamlist = config["inputs"]["alignments"] # toggle linked-read aware mode if config["ignore_bx"]: - fragfile = outdir + "/extractHairs/{sample}.unlinked.frags" + fragfile = outdir + "/extract_hairs/{sample}.unlinked.frags" linkarg = "--10x 0" else: - fragfile = outdir + "/linkFragments/{sample}.linked.frags" + fragfile = outdir + "/link_fragments/{sample}.linked.frags" linkarg = "--10x 1" if samples_from_vcf: @@ -186,9 +186,9 @@ rule extract_hairs: geno = geno, fai = genofai output: - outdir + "/extractHairs/{sample}.unlinked.frags" + outdir + "/extract_hairs/{sample}.unlinked.frags" log: - outdir + "/logs/extractHairs/{sample}.unlinked.log" + outdir + "/logs/extract_hairs/{sample}.unlinked.log" params: indels = indelarg, bx = linkarg @@ -205,11 +205,11 @@ rule link_fragments: input: bam = get_alignments, vcf = outdir + "/workflow/input/vcf/{sample}.het.vcf", - fragments = outdir + "/extractHairs/{sample}.unlinked.frags" + fragments = outdir + "/extract_hairs/{sample}.unlinked.frags" output: - outdir + "/linkFragments/{sample}.linked.frags" + outdir + "/link_fragments/{sample}.linked.frags" log: - outdir + "/logs/linkFragments/{sample}.linked.log" + outdir + "/logs/link_fragments/{sample}.linked.log" params: d = molecule_distance conda: @@ -226,10 +226,10 @@ rule phase_blocks: vcf = outdir + "/workflow/input/vcf/{sample}.het.vcf", fragments = fragfile output: - blocks = outdir + "/phaseBlocks/{sample}.blocks", - vcf = temp(outdir + "/phaseBlocks/{sample}.blocks.phased.VCF") + blocks = outdir + "/phase_blocks/{sample}.blocks", + vcf = temp(outdir + "/phase_blocks/{sample}.blocks.phased.VCF") log: - outdir + "/logs/phaseBlocks/{sample}.blocks.phased.log" + outdir + "/logs/phase_blocks/{sample}.blocks.phased.log" params: prune = f"--threshold {pruning}" if pruning > 0 else "--no_prune 1", extra = extra @@ -244,9 +244,9 @@ rule phase_blocks: rule compress_phaseblock: input: - outdir + "/phaseBlocks/{sample}.blocks.phased.VCF" + outdir + "/phase_blocks/{sample}.blocks.phased.VCF" output: - outdir + "/phaseBlocks/{sample}.phased.vcf.gz" + outdir + "/phase_blocks/{sample}.phased.vcf.gz" container: None message: @@ -262,11 +262,11 @@ use rule compress_phaseblock as compress vcf with: rule merge_annotations: input: - phase = outdir + "/phaseBlocks/{sample}.phased.vcf.gz", + phase = outdir + "/phase_blocks/{sample}.phased.vcf.gz", orig = outdir + "/workflow/input/gzvcf/{sample}.hom.vcf.gz" output: - bcf = outdir + "/annotations/{sample}.phased.annot.bcf", - idx = outdir + "/annotations/{sample}.phased.annot.bcf.csi" + bcf = outdir + "/phased_samples/{sample}.phased.annot.bcf", + idx = outdir + "/phased_samples/{sample}.phased.annot.bcf.csi" threads: 2 benchmark: @@ -280,8 +280,8 @@ rule merge_annotations: rule merge_samples: input: - bcf = collect(outdir + "/annotations/{sample}.phased.annot.bcf", sample = samplenames), - idx = collect(outdir + "/annotations/{sample}.phased.annot.bcf.csi", sample = samplenames) + bcf = collect(outdir + "/phased_samples/{sample}.phased.annot.bcf", sample = samplenames), + idx = collect(outdir + "/phased_samples/{sample}.phased.annot.bcf.csi", sample = samplenames) output: bcf = outdir + "/variants.phased.bcf", idx = outdir + "/variants.phased.bcf.csi" @@ -305,7 +305,7 @@ rule merge_samples: rule summarize_blocks: input: - collect(outdir + "/phaseBlocks/{sample}.blocks", sample = samplenames) + collect(outdir + "/phase_blocks/{sample}.blocks", sample = samplenames) output: outdir + "/reports/blocks.summary.gz" params: