From f5987a322e87fec25a493db78efa4544237fed94 Mon Sep 17 00:00:00 2001 From: Dane Vassiliadis Date: Sun, 5 Nov 2023 22:39:49 +1100 Subject: [PATCH] updated quickstart vignette and rebuilt site for gh-pages --- .github/.gitignore | 1 + .github/workflows/pkgdown.yaml | 48 +++++++++++++++++++++++++++++++ docs/pkgdown.yml | 2 +- vignettes/bartools_quickstart.Rmd | 41 ++++++++++++-------------- 4 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/pkgdown.yaml diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..ed7650c --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -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/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index b0594be..852c439 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -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 diff --git a/vignettes/bartools_quickstart.Rmd b/vignettes/bartools_quickstart.Rmd index 8e6cc94..4a51507 100644 --- a/vignettes/bartools_quickstart.Rmd +++ b/vignettes/bartools_quickstart.Rmd @@ -255,20 +255,19 @@ 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") ``` @@ -276,26 +275,24 @@ plotOrderedBubble(counts.obj = dge.filtered.collapsed$counts, 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") ``` @@ -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) ``` @@ -316,7 +313,7 @@ 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 @@ -324,10 +321,8 @@ plotBarcodeTimeseries(dge.filtered.collapsed, top = 5) 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