Skip to content

Commit

Permalink
minor fix to report
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeletperes committed Apr 16, 2024
1 parent a0d8ec9 commit 29ea5a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inst/rstudio/templates/project/project_files/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ non_prod <- F
if(any(!is.na(repertoire$productive))){
prod_info <- data.table("Category"=factor(repertoire$productive,
levels = c("TRUE","FALSE")))
non_prod <- any(!repertoire$productive)
non_prod <- T
}
```

Expand All @@ -157,7 +157,7 @@ if(cols_non_prod_breakdown){

## Productive vs. non-productive sequences

```{r non_prod_figure, fig.cap= "The number of productive and non productive sequences. The x-axis is the productive definition, and the y-axis is the abdunce count.", warning=TRUE,results="asis"}
```{r non_prod_figure, fig.cap= "The number of productive and non productive sequences. The x-axis is the productive definition, and the y-axis is the abdunce count.", warning=TRUE,results="asis", eval=non_prod}
#SECTION 4
ggplot2::ggplot(
prod_info,
Expand All @@ -168,7 +168,7 @@ ggplot2::ggplot(
ggplot2::scale_x_discrete(drop = FALSE, labels=c("Productive", "Non-productive", "NA/Not specified"))
```

```{r non_prod_table, warning=FALSE,results="asis"}
```{r non_prod_table, warning=FALSE,results="asis", eval=non_prod}
knitr::kable(prod_info %>%
dplyr::count(!!as.name("Category"), name = "Number of sequences", .drop = F) %>%
dplyr::mutate("Category" = as.character(!!as.name("Category")),
Expand Down

0 comments on commit 29ea5a1

Please sign in to comment.