Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
^.*\.Rproj$
^\.Rproj\.user$
^LICENSE$
^environment\.yml$
^QC_report\.ipynb$
^QC_report_files$
^\.quarto$
^\.cursor$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
^data-raw$
134 changes: 134 additions & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# 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
#
# Pushes to main deploy the site to the root of GitHub Pages. Pull requests
# from this repository deploy a preview to preview/pr-<number>/, which is
# removed when the pull request is closed.
on:
push:
branches: [main, master]
pull_request:
types: [opened, synchronize, reopened, closed]
release:
types: [published]
workflow_dispatch:

name: pkgdown.yaml

permissions: read-all

env:
SITE_URL: https://eppicenter.github.io/ampseq-qc/

jobs:
pkgdown:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
concurrency:
group: pkgdown-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
PREVIEW_DIR: ${{ github.event_name == 'pull_request' && format('preview/pr-{0}', github.event.pull_request.number) || '' }}
CAN_DEPLOY: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v6

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

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

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

- uses: quarto-dev/quarto-actions/setup@v2

- name: Build site
run: |
preview_dir <- Sys.getenv("PREVIEW_DIR")
override <- if (nzchar(preview_dir)) list(url = paste0(Sys.getenv("SITE_URL"), preview_dir)) else list()
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override = override)
shell: Rscript {0}

- name: Render example QC report
run: |
tutorial <- system.file("extdata", "tutorial", package = "ampseqQC")
ampseqQC::render_qc_report(
results_dir = file.path(tutorial, "results"),
manifest_file = file.path(tutorial, "manifest.csv"),
output_dir = "docs/example-report"
)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
with:
clean: true
clean-exclude: preview
branch: gh-pages
folder: docs

# Keeps GitHub Pages from running Jekyll before the main site has been deployed
- name: Add .nojekyll to GitHub pages root
if: github.event_name == 'pull_request' && env.CAN_DEPLOY == 'true'
run: mkdir -p pages-root && touch pages-root/.nojekyll

- name: Deploy .nojekyll to GitHub pages
if: github.event_name == 'pull_request' && env.CAN_DEPLOY == 'true'
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
with:
clean: false
branch: gh-pages
folder: pages-root

- name: Deploy preview to GitHub pages
if: github.event_name == 'pull_request' && env.CAN_DEPLOY == 'true'
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
with:
clean: true
branch: gh-pages
folder: docs
target-folder: ${{ env.PREVIEW_DIR }}

- name: Comment preview link
if: github.event_name == 'pull_request' && env.CAN_DEPLOY == 'true'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pkgdown-preview
message: |
📖 Documentation preview for ${{ github.event.pull_request.head.sha }}:

* Site: ${{ env.SITE_URL }}${{ env.PREVIEW_DIR }}/
* Tutorial: ${{ env.SITE_URL }}${{ env.PREVIEW_DIR }}/articles/ampseqQC.html
* Example report: ${{ env.SITE_URL }}${{ env.PREVIEW_DIR }}/example-report/QC_report.html

GitHub Pages can take a minute or two to update.

remove-preview:
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
concurrency:
group: pkgdown-${{ github.event.pull_request.number }}
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
ref: gh-pages

- name: Remove preview
run: |
preview_dir="preview/pr-${{ github.event.pull_request.number }}"
if [ -d "$preview_dir" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git rm -r --quiet "$preview_dir"
git commit -m "Remove documentation preview for PR #${{ github.event.pull_request.number }}"
git push
fi
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ vignettes/*.pdf
# pkgdown site
docs/

# built vignettes
inst/doc

# translation temp files
po/*~

Expand Down
44 changes: 37 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
Package: ampseq-qc
Package: ampseqQC
Type: Package
Title: QC Summary Shiny App
Title: Quality Control Reports for Mad4hatter Amplicon Sequencing Runs
Version: 0.1.0
Author: EPPIcenter
Maintainer: kathryn.murie@ucsf.edu
Description: A Shiny app for visualizing QC summary data from ampseq data
Depends: R (>= 3.5.0), shiny, shinyFiles, ggplot2, dplyr, tidyr, ggbeeswarm, stringr
License: MIT
Authors@R: c(
person("Kathryn", "Murie", email = "kathryn.murie@ucsf.edu", role = c("aut", "cre")),
person("EPPIcenter", role = "cph")
)
Description: Summarises quality control statistics for targeted amplicon
sequencing runs processed with the Mad4hatter pipeline, combining pipeline
outputs with a sample manifest. Provides functions to load results, assign
targets to multiplex PCR reactions from their pools, classify samples as
pass, repool or reprep, summarise positive and negative controls, filter
allele tables, and render an HTML QC report.
License: GPL-3
URL: https://eppicenter.github.io/ampseq-qc/, https://github.com/EPPIcenter/ampseq-qc
BugReports: https://github.com/EPPIcenter/ampseq-qc/issues
Encoding: UTF-8
Depends:
R (>= 4.1.0)
Imports:
dplyr (>= 1.1.0),
ggbeeswarm,
ggplot2,
kableExtra,
knitr,
plotly,
purrr,
rlang,
tibble,
tidyr
Suggests:
rmarkdown,
testthat (>= 3.0.0),
withr
VignetteBuilder: knitr
Config/testthat/edition: 3
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
58 changes: 58 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generated by roxygen2: do not edit by hand

S3method(print,ampseqQC_panel_settings)
export(add_allele_frequency)
export(allele_table_group_cols)
export(assign_reactions)
export(check_sample_names)
export(count_targets_per_reaction)
export(create_plate_template)
export(create_tabset)
export(default_panel_settings)
export(fill_missing_data)
export(filter_allele_table)
export(generate_balancing_plot)
export(generate_dimer_plot)
export(generate_parasitemia_by_amplification_success_plot)
export(generate_parasitemia_by_amplification_success_plots)
export(generate_reads_by_amplification_success_plot)
export(generate_reads_by_amplification_success_plots)
export(generate_reprep_repool_table)
export(interactive_plot)
export(merge_amplicon_coverage)
export(merge_sample_coverage)
export(missing_samples_report)
export(missing_targets_report)
export(negative_control_amplicons)
export(negative_control_plot_height)
export(negative_control_targets_over_threshold)
export(panel_settings)
export(plot_negative_control_histogram)
export(plot_negative_control_target_reads)
export(plot_plate)
export(plot_plate_heat_maps)
export(plot_plate_layouts)
export(plot_plate_with_feature)
export(plot_positive_control_alleles)
export(plot_qc_status_by_batch)
export(print_sized_plot)
export(qc_excluded_targets)
export(qc_report_template)
export(qc_status_counts)
export(qc_summary_by_batch)
export(qc_summary_table)
export(read_mad4hatter_results)
export(read_manifest)
export(render_qc_report)
export(sample_counts_by_file)
export(sample_name_mismatches)
export(sample_qc_status)
export(samples_missing_from_allele_data)
export(samples_with_status)
export(standardise_illumina_sample_name)
export(styled_table)
export(summarise_negative_control_targets)
export(summarise_pools)
export(summarise_positive_controls)
export(summarise_samples)
importFrom(dplyr,"%>%")
Loading
Loading