Skip to content

Commit

Permalink
updated quickstart vignette and rebuilt site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneVass committed Nov 5, 2023
1 parent ff79c31 commit f5987a3
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
48 changes: 48 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
bartools_quickstart: bartools_quickstart.html
last_built: 2023-11-02T03:56Z
last_built: 2023-11-05T11:37Z
urls:
reference: https://danevass.github.io/bartools/reference
article: https://danevass.github.io/bartools/articles
Expand Down
41 changes: 18 additions & 23 deletions vignettes/bartools_quickstart.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -255,47 +255,44 @@ Here, barcodes/tags are represented by bubbles aligned on a single plane.
The size of the bubbles reflects the percentage abundance of each barcode within a sample.

```{r}
plotBarcodeBubble(dge.filtered.collapsed$counts,
proportion.cutoff = 10,
labels = T)
plotBarcodeBubble(counts = dge.filtered.collapsed$counts,
proportionCutoff = 10,
labelBarcodes = T)
```

Using the `orderSample` parameter, bubbleplots can also be arranged according to frequency in a particular sample which can help with visual comparison of large vs small clones across samples and conditions.

```{r}
plotOrderedBubble(counts.obj = dge.filtered.collapsed$counts,
proportion.cutoff = 10,
labels = T,
plotOrderedBubble(counts = dge.filtered.collapsed$counts,
proportionCutoff = 10,
labelBarcodes = T,
orderSample = "T0",
colorDominant = F,
filterLow = T,
samples = dge.filtered.collapsed$samples,
group = "Treatment")
```

Barcodes that fail to meet a defined abundance threshold in any sample can be greyed out.

```{r}
plotOrderedBubble(counts.obj = dge.filtered.collapsed$counts,
proportion.cutoff = 10,
labels = T,
plotOrderedBubble(counts = dge.filtered.collapsed$counts,
proportionCutoff = 10,
labelBarcodes = T,
orderSample = "T0",
colorDominant = T,
filterLow = T,
samples = dge.filtered.collapsed$samples,
group = "Treatment")
```

Or filtered from the plot entirely using `filterLow` and `filter.cutoff` parameters
Or filtered from the plot entirely using the `filterCutoff` parameter

```{r}
plotOrderedBubble(counts.obj = dge.filtered.collapsed$counts,
proportion.cutoff = 10,
labels = T,
plotOrderedBubble(counts = dge.filtered.collapsed$counts,
proportionCutoff = 10,
labelBarcodes = T,
orderSample = "T0",
colorDominant = T,
filterLow = T,
filter.cutoff = 0.01,
filterCutoff = 0.01,
samples = dge.filtered.collapsed$samples,
group = "Treatment")
```
Expand All @@ -305,7 +302,7 @@ plotOrderedBubble(counts.obj = dge.filtered.collapsed$counts,
Alternatively, we can focus in on the most abundant barcodes within a set of samples to more easily observe how these change in frequency over the course of an experiment.

```{r}
plotBarcodeHistogram(dge.filtered.collapsed$counts,
plotBarcodeHistogram(counts.obj = dge.filtered.collapsed$counts,
sample = dge.filtered.collapsed$samples$group[[10]],
top = 50)
```
Expand All @@ -316,18 +313,16 @@ For timecourse experiments it is useful to visualise how the kinetics of barcode
In this instance we can use `plotBarcodeTimeseries` to get an idea of the relative abundance of the top *n* barcodes in a sample relative to others.

```{r}
plotBarcodeTimeseries(dge.filtered.collapsed, top = 5)
plotBarcodeTimeseries(counts.obj = dge.filtered.collapsed, top = 5)
```

### Principal Components Analysis

A global level PCA analysis is a good way to get a high level understanding of the similarities and differences between samples.

```{r}
plotBarcodePCA(
dge.filtered.collapsed[, dge.filtered.collapsed$samples$Treatment %in%
c("T0", "Vehicle", "High_dose")],
intgroup = "Treatment")
subset <- dge.filtered.collapsed[, dge.filtered.collapsed$samples$Treatment %in% c("T0", "Vehicle", "High_dose")]
plotBarcodePCA(object = subset, intgroup = "Treatment")
```

### Heatmaps
Expand Down

0 comments on commit f5987a3

Please sign in to comment.