Skip to content

Commit

Permalink
update plots
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed May 15, 2024
1 parent 8f08194 commit 931cc4f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/harpy/reports/AlignStats.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ hs <- hist(
breaks = min(valids$reads):max(valids$reads),
plot = F
)
hs$counts <- round(hs$counts / sum(hs$counts) * 100, 2)
hs$counts <- round(hs$counts / sum(hs$counts) * 100, 4)
hs <- data.frame(val = hs$breaks[-1], freq = hs$counts)
hchart(hs, "areaspline", hcaes(x = val, y = freq), color = "#8484bd", name = "% of molecules", marker = list(enabled = FALSE)) |>
Expand All @@ -145,7 +145,7 @@ hchart(hs, "areaspline", hcaes(x = val, y = freq), color = "#8484bd", name = "%
### bases per {.no-title}
```{r basesper, echo = FALSE, message = FALSE, warning = FALSE, out.width="100%"}
hs <- hist(round(valids$aligned_bp, -2), breaks = 50, plot = F)
hs$counts <- round(hs$counts / sum(hs$counts)*100,2)
hs$counts <- round(hs$counts / sum(hs$counts)*100,4)
hs <- data.frame(val = hs$breaks[-1], freq = hs$counts)
hchart(hs, "areaspline", hcaes(x = val, y = freq), color = "#75b89e", name = "% of molecules", marker = list(enabled = FALSE)) |>
Expand All @@ -159,7 +159,6 @@ hchart(hs, "areaspline", hcaes(x = val, y = freq), color = "#75b89e", name = "%
)
```


## inferred-header
### inferred desc {.no-title}
<h2> Inferred Molecule Lengths </h2>
Expand Down Expand Up @@ -212,12 +211,13 @@ molecule coverage as `300bp ÷ molecule_length`, whereas the plot on the right c

### coverage by aligned bp {.no-title}
```{r inferred_cov_bp, echo = FALSE, message = FALSE, warning = FALSE, out.width = '100%'}
#TODO THIS IS BROKEN
hs <- hist(
round(valids$percent_coverage, 0),
breaks = seq(0, round(max(valids$coverage_bp + 1, 0)), by = 1),
round(valids$coverage_bp, 0),
breaks = seq(0, 1, by = 0.05),
plot = F
)
hs$counts <- round(hs$counts / sum(hs$counts)*100,2)
hs$counts <- round(hs$counts / sum(hs$counts)*100,4)
hs <- data.frame(val = hs$breaks[-1], freq = hs$counts)
hchart(hs, "areaspline", hcaes(x = val, y = freq), color = "#e59765", name = "% of molecules", marker = list(enabled = FALSE)) |>
Expand All @@ -234,8 +234,8 @@ hchart(hs, "areaspline", hcaes(x = val, y = freq), color = "#e59765", name = "%
### coverage by inserts {.no-title}
```{r inferred_cov_insert, echo = FALSE, message = FALSE, warning = FALSE, out.width = '100%'}
hs <- hist(
round(valids$percent_coverage, 0),
breaks = seq(0, round(max(valids$coverage_inserts + 1, 0)), by = 1),
round(valids$coverage_inserts, 0),
breaks = seq(0, 1, by = 0.05),
plot = F
)
hs$counts <- round(hs$counts / sum(hs$counts)*100,2)
Expand Down

0 comments on commit 931cc4f

Please sign in to comment.