Skip to content

Commit

Permalink
Add contamination status to summary table and commit snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor committed Mar 2, 2024
1 parent b172e58 commit eb44546
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 13 deletions.
21 changes: 18 additions & 3 deletions reports/report.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,21 @@ Row
colors <- c("#28a745", "#dc3545")
names(colors) <- c("PASSED", "FAILED")
colors_contamination <- c("#dddddd","#28a745", "#dc3545")
names(colors_contamination) <- c("-", "NO", "YES")
statistics %>%
mutate (Sample_Link = link_to_sample(Sample_Label)) %>%
select("Sample_Link", "MeanDepth", "CoveragePercentage", "CoveredBases", "MeanBaseQuality", "MeanMapQuality", "qc") %>%
mutate (
Sample_Link = link_to_sample(Sample_Label),
contamination = case_when(
qc == "FAILED" ~ "-",
Sample_Label %in% contaminated_samples$Sample_Label ~ "YES",
TRUE ~ "NO"
)
) %>%
select("Sample_Link", "MeanDepth", "CoveragePercentage", "CoveredBases", "MeanBaseQuality", "MeanMapQuality", "qc", "contamination") %>%
datatable(
colnames=c("Sample", "Mean Coverage", "Covered Bases (%)", "Covered Bases", "Mean Base Quality", "Mean Mapping Quality", "QC"),
colnames=c("Sample", "Mean Coverage", "Covered Bases (%)", "Covered Bases", "Mean Base Quality", "Mean Mapping Quality", "QC", "Cont."),
options = list(
bPaginate = FALSE
),
Expand All @@ -149,6 +159,11 @@ statistics %>%
'qc',
backgroundColor = styleEqual(c("PASSED", "FAILED"), colors),
color = 'white'
) %>%
formatStyle(
'contamination',
backgroundColor = styleEqual(c("-", "NO", "YES"), colors_contamination),
color = 'white'
)
```

Expand Down
50 changes: 40 additions & 10 deletions tests/mitocalling.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@
},
"timestamp": "2024-02-26T23:09:58.251860914"
},
"Runs with 6 samples provided as testdata with mutect2": {
"content": [
"variants.annotated.txt:md5,efeb591e666bd107fbb0ce47898b6304",
{
"tasksFailed": 0,
"tasksCount": 24,
"tasksSucceeded": 24
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.04.3"
},
"timestamp": "2024-03-02T10:54:19.802653"
},
"Runs with single BAM file and mutserve": {
"content": [
"variants.annotated.txt:md5,aac0aee87ce1a91f8c35264be248b52e"
Expand All @@ -29,34 +44,49 @@
},
"timestamp": "2024-02-26T23:03:07.470112898"
},
"Runs with 6 samples provided as testdata": {
"Runs with two files and one goes through QC": {
"content": [
"variants.annotated.txt:md5,efeb591e666bd107fbb0ce47898b6304",
"variants.annotated.txt:md5,3946a3bd26ceafe8f61903499bfcbb35",
{
"tasksFailed": 0,
"tasksCount": 24,
"tasksSucceeded": 24
"tasksCount": 12,
"tasksSucceeded": 12
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.04.3"
},
"timestamp": "2024-03-01T13:54:57.136897"
"timestamp": "2024-02-28T12:32:40.624776"
},
"Runs with two files and one goes through QC": {
"Runs with 6 samples provided as testdata with fusion": {
"content": [
"variants.annotated.txt:md5,3946a3bd26ceafe8f61903499bfcbb35",
"variants.annotated.txt:md5,b8a0bbf624f5b0ecaac01ca441b50a76",
{
"tasksFailed": 0,
"tasksCount": 12,
"tasksSucceeded": 12
"tasksCount": 40,
"tasksSucceeded": 40
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.04.3"
},
"timestamp": "2024-02-28T12:32:40.624776"
"timestamp": "2024-03-02T10:58:52.06124"
},
"Runs with 6 samples provided as testdata with mutserve": {
"content": [
"variants.annotated.txt:md5,5c726eaa61eacfb09c64ebaeb9a2a75a",
{
"tasksFailed": 0,
"tasksCount": 25,
"tasksSucceeded": 25
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.04.3"
},
"timestamp": "2024-03-02T10:50:44.742545"
}
}

0 comments on commit eb44546

Please sign in to comment.