Skip to content

Commit

Permalink
small report table fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolai-vKuegelgen committed Oct 21, 2024
1 parent 08e351f commit 06b49a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion stemcnv_check/app/setup_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def setup_control_files(args):
comment_lines.append(line.rstrip())
else:
break
logging.info('writing sample table: ' + args.sample_table)
with pd.ExcelWriter(args.sample_table) as writer:
pd.DataFrame(comment_lines).to_excel(writer, index=False, header=False)
read_sample_table(source_file, return_type='dataframe').to_excel(writer, index=False)
Expand Down
9 changes: 4 additions & 5 deletions stemcnv_check/scripts/report_template.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ make_CNV_plot_section <- function(call.table, plotsection = 'denovo') {
# message(str_glue('N hotspots: {length(res$hotspots)}'))
if (report_config$call.data.and.plots[[plotsection]]$include.hotspot.table & length(res$hotspots)>0) {
res$hotspots %>%
hotspot_table_output(plotsection, row$CNV_type, high_impact_tb, highlight_tb, report_config, params$out_format) %>%
hotspot_table_output(as.character(row$CNV_type), plotsection, high_impact_tb, highlight_tb, report_config, params$out_format) %>%
subchunkify(str_glue('CNV_call.{plotsection}.nr{i}.hotspots'))
cat('\n\n')
}
Expand Down Expand Up @@ -269,8 +269,8 @@ repo_excl_filters <- ifelse(
)
cat(paste(
'Call designation takes into account the Check_Score thresholds for critical and optoinally reportable level.',
'Additionally, calls having an exclusion filter (i.e. below minimum size, or having a probe coverage gap) ',
'Call designation takes into account the Check_Score thresholds for critical and optionally reportable level.',
'Additionally, calls flagged with an exclusion filter (i.e. below minimum size, or having a probe coverage gap) ',
'for a specific designation are assigend the next lower level (i.e. critical -> reportable or reportable -> no label).\n\n',
'The current thresholds and exclsuion filters are:\n\n',
' - Critical Check_Score:', config$evaluation_settings$CNV_call_categorisation$check_score.critical, '\n\n',
Expand Down Expand Up @@ -421,8 +421,7 @@ reference_calls.table <- cnv_calls %>%
dplyr::rename(chrom = seqnames, Size = width) %>%
arrange(desc(Check_Score), desc(Size), chrom, start) %>%
filter(
sample_id == !!sample_id & Call_label == 'Reference genotype' |
Call_label %in% report_config$call.data.and.plots$reference_gt$always_include
sample_id == !!sample_id & Call_label == 'Reference genotype'
) %>%
filter(!str_detect(FILTER, refgt_filter_regex)) %>%
mutate(i = row_number())
Expand Down

0 comments on commit 06b49a2

Please sign in to comment.