Skip to content

Commit

Permalink
Merge branch 'release/0.7.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
carjed committed Jun 12, 2018
2 parents faf5d36 + 25f3a35 commit 2977559
Show file tree
Hide file tree
Showing 10 changed files with 4,194 additions and 2,806 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- # DOOMSAYER -->

![](assets/doomsayer_logo2.png)
![](https://raw.githubusercontent.com/carjed/doomsayer/master/assets/doomsayer_logo2.png)

[![DOI](https://zenodo.org/badge/95728792.svg?style=flat)](https://zenodo.org/badge/latestdoi/95728792) [![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](http://www.jedidiahcarlson.com/docs/doomsayer) [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://opensource.org/licenses/MIT) [![Binder](https://img.shields.io/badge/launch-binder-d06681.svg?style=flat)](https://mybinder.org/v2/gh/carjed/doomsayer/master) [![Build Status](https://travis-ci.org/carjed/doomsayer.svg?style=flat?branch=master)](https://travis-ci.org/carjed/doomsayer)

Expand Down
255 changes: 0 additions & 255 deletions docs/index.md

Large diffs are not rendered by default.

335 changes: 335 additions & 0 deletions docs/usage.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ site_url: https://github.com/carjed/doomsayer
repo_url: https://github.com/carjed/doomsayer
pages:
- Home: index.md
- Usage: usage.md
- FAQ: faq.md
- Support: support.md
theme: cinder
33 changes: 0 additions & 33 deletions report_templates/R/stat_boxplots.Rmd

This file was deleted.

52 changes: 52 additions & 0 deletions report_templates/R/stat_boxplots1.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
```{r boxplots1, results='asis', message=FALSE, warning=FALSE, echo=FALSE, fig.height = 8, fig.width = 12, dpi=100, fig.align="center"}
if(exists("samples") & exists("svars")){
cat("## Outlier QC statistic boxplots \n")
cat("### Plot description \n")
cat("If the user has included a file of sample-level summary statistics with the --samplefile` option and has specified variables to analyze with the `--svars` option, this plot will show the distributions of those variables for the outliers compared to the inlier samples. \n \n")
cat("### Interpreting this plot \n")
cat("These boxplots tell us whether the outliers detected by *Doomsayer* show differences in other sample-level summary statistics. \n")
sigs2 <- merge(sig_contribs, samples, by="ID") %>%
mutate(outlier=ifelse(ID %in% outlier_IDs, T, F))
sigs2 <- merge(sigs2, cluster_mems, by="ID", all.x=T)
sigs2[is.na(sigs2$group),]$group <- "keep"
sumdat <- sigs2 %>%
# filter(sig!=2) %>%
group_by(group) %>%
dplyr::select(c("ID","group",svars)) %>%
# filter(coverage < 15) %>%
gather(var, val, svars[1]:svars[length(svars)]) %>%
group_by(group, var)
# figure showing that simple cutoffs for quality indicators would not easily
# differentiate inliers vs. Doomsayer's flagged outliers
sumdat1 <- sumdat %>%
ungroup() %>%
mutate(group = gsub(" .*", "", group))
p1 <- ggplot(sumdat1, aes(x=group, y=val, group=group, fill=group))+
geom_boxplot()+
scale_fill_manual(values=c("gray30", "red"))+
facet_wrap(~var, scales="free")+
theme_bw()+
theme(axis.text.x=element_text(angle=45, hjust=1),
axis.title.x=element_blank(),
legend.position="none")
sggplotly(p1)
} else {
sigs2 <- merge(sig_contribs, cluster_mems, by="ID", all.x=T) %>%
mutate(outlier=ifelse(ID %in% outlier_IDs, T, F))
sigs2[is.na(sigs2$group),]$group <- "keep"
}
```
28 changes: 28 additions & 0 deletions report_templates/R/stat_boxplots2.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
```{r boxplots2, results='asis', message=FALSE, warning=FALSE, echo=FALSE, fig.height = 8, fig.width = 12, dpi=100, fig.align="center"}
if(exists("samples") & exists("svars")){
cat("### Plot description \n")
cat("The plot below shows the distributions of user-specified QC variables for the inlier samples compared to the outlier samples grouped according to the cluster assignment shown in the [heatmap](#error_profile_heatmap) \n \n")
cat("### Interpreting this plot \n")
cat("These boxplots tell us whether **specific groups** of outliers detected by *Doomsayer* show differences in other sample-level summary statistics. \n")
# figure showing that simple cutoffs for quality indicators would not easily
# differentiate inliers vs. Doomsayer's flagged outliers
p2 <- ggplot(sumdat, aes(x=group, y=val, group=group, fill=group))+
geom_boxplot()+
scale_fill_manual(values=c("gray30", group_col_vals))+
facet_wrap(~var, scales="free")+
theme_bw()+
theme(axis.text.x=element_text(angle=45, hjust=1),
axis.title.x=element_blank(),
legend.position="none")
sggplotly(p2)
}
```
11 changes: 4 additions & 7 deletions report_templates/diagnostics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,10 @@ Note that a lack of obvious clustering patterns does not necessarily mean the fl
```{r child="R/heatmap.Rmd"}
```

## Outlier QC statistic boxplots

### Plot description

If the user has included a file of sample-level summary statistics with the `--samplefile` option and has specified variables to analyze with the `--svars` option, this plot will show the distributions of those variables for the outliers in each cluster, compared to the inlier samples.
```{r child="R/stat_boxplots1.Rmd"}
```

```{r child="R/stat_boxplots.Rmd"}
```{r child="R/stat_boxplots2.Rmd"}
```

## Compare component distributions
Expand Down Expand Up @@ -77,7 +74,7 @@ If you are using NMF decomposition and two or more components are perfectly corr

### Plot description

Each bar represents the fraction of observations contained within that K-mer subtype across all samples of a particular group.
Each bar represents the fraction of observations contained within that K-mer subtype across all samples of a particular group. Bars that are solid colors indicate the outliers in that group have a significantly higher or lower proportion of those SNVs compared to the inlier group (FDR-adjusted; Q-value < 0.05), whereas greyed-out bars indicate no significant difference.

```{r child="R/spectra.Rmd"}
```
Expand Down
Loading

0 comments on commit 2977559

Please sign in to comment.