Skip to content

Commit 44cca51

Browse files
committed
skip mutation related content
1 parent db77b40 commit 44cca51

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

R/dashboard_markdown_generator.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ parser$add_argument("--testing",
1515

1616
args <- parser$parse_args()
1717
release <- args$release
18+
testing <- args$testing
1819
template_path <- args$template_path
1920
suppressPackageStartupMessages(library(synapser))
2021
suppressPackageStartupMessages(library(rmarkdown))
@@ -42,7 +43,7 @@ rmarkdown_path = sprintf('%s.Rmd', release)
4243
file.copy(template_path, rmarkdown_path, overwrite = T)
4344
rmarkdown::render(rmarkdown_path,
4445
params = list("database_synid_mappingid" = database_synid_mappingid,
45-
"release" = release))
46+
"release" = release, "testing" = testing))
4647
# Obtain release folder
4748
database_synid_mapping = synTableQuery(sprintf('select * from %s',
4849
database_synid_mappingid))

templates/dashboardTemplate.Rmd

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ params:
88
value: x
99
release:
1010
value: x
11+
testing:
12+
value: x
1113
---
1214

1315
```{r setup, include=FALSE}
@@ -276,7 +278,13 @@ Please confirm that the the number of samples and variants in this release is wh
276278
sampleCounts = table(this_samples$CENTER)
277279
samplesPerReleaseDf = as.data.frame(sampleCounts)
278280
colnames(samplesPerReleaseDf) = c("Center", "Samples")
279-
variant_counts = table(this_mut$Center)
281+
if (testing) {
282+
# generate a temp variant_counts for later step
283+
temp <- factor(rep(c("GOLD", "SAGE"), c(3,4)), levels = c("GOLD", "SAGE"))
284+
variant_counts = table(temp)
285+
} else{
286+
variant_counts = table(this_mut$Center)
287+
}
280288
variant_countsdf = as.data.frame(variant_counts)
281289
colnames(variant_countsdf) = c("Center", "Variants")
282290
release_infodf = merge.data.frame(samplesPerReleaseDf, variant_countsdf, by="Center", all=T)
@@ -551,7 +559,7 @@ filtered_mafdf <- filter_maf(this_mut)
551559
```
552560

553561

554-
```{r top_5_mutated, echo=FALSE}
562+
```{r top_5_mutated, echo=FALSE, eval = !testing}
555563
mergeddf = merge.data.frame(filtered_mafdf[,c("Tumor_Sample_Barcode", "Hugo_Symbol")],
556564
this_samples[,c("SAMPLE_ID", "SEQ_ASSAY_ID")],
557565
by.x = "Tumor_Sample_Barcode",
@@ -579,7 +587,6 @@ final_matrix = cbind(transposed_matrix, table(mergeddf$SEQ_PIPELINE_ID)[row.name
579587
colnames(final_matrix) = c(1, 2, 3, 4, 5, "Total Variants")
580588
kable(final_matrix,
581589
caption = "Distribution of top 5 most frequently mutated genes per SEQ_PIPELINE_ID")
582-
583590
```
584591

585592

@@ -592,7 +599,8 @@ These are all the pipelines that cover TP53 that don't have TP53 as the top muta
592599
this_bed = merge.data.frame(this_bed,
593600
assay_infodf[,c("SEQ_ASSAY_ID", "SEQ_PIPELINE_ID")],
594601
by = "SEQ_ASSAY_ID")
595-
if (!is.null(this_bed)) {
602+
if (!testing){
603+
if (!is.null(this_bed)) {
596604
panels_covering_tp53 = unique(this_bed$SEQ_PIPELINE_ID[this_bed$Hugo_Symbol == "TP53"])
597605
# Exclude panels if TP53 is top mutated
598606
tp53_not_top = sapply(names(top_5_mutated_genes), function(seq_assay) {
@@ -612,6 +620,7 @@ if (!is.null(this_bed)) {
612620
kable(final_matrix,
613621
caption = "Distribution of top 5 most frequently mutated genes per SEQ_PIPELINE_ID")
614622
}
623+
}
615624
```
616625

617626
---

0 commit comments

Comments
 (0)