Skip to content
Open
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: R CI
on:
push:
branches: [main, fix/45-fix_ci_yaml]
pull_request:
branches: [main, fix/45-fix_ci_yaml]

jobs:
test-coverage:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up pdflatex
run: |
sudo apt-get update
sudo apt-get install -y texlive-latex-base
sudo apt-get install texlive-fonts-extra

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

# - name: Install covr package
# run: Rscript -e 'install.packages("covr")'

- name: Install Dependencies
run: |
R -e 'install.packages(c("devtools", "covr", "ggplot2", "WriteXLS", "gridExtra", "Cairo"))'

- name: Build and test
run: |
R CMD build .
R CMD check .
# R CMD check --as-cran *tar.gz

- name: Run Tests and Generate Coverage
run: |
Rscript -e 'library(devtools); devtools::test()'
Rscript -e 'library(covr); covr::codecov()'

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
35 changes: 32 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
language: r
sudo: false
cache: packages

r_github_packages:
- r-lib/covr
branches:
only:
- main
- master
- CI/CD
- test
- fix/45-fix_ci_yaml

before_install:
- sudo apt-get update
- sudo apt-get install -y texlive-latex-base
- sudo apt-get install texlive-fonts-extra

install:
- Rscript -e 'install.packages("covr")'
- R -e 'install.packages(c("devtools", "ggplot2", "WriteXLS", "gridExtra", "Cairo"))'

script:
- R CMD build .
- R CMD check --as-cran *tar.gz
- Rscript -e 'library(devtools); devtools::test()'
- Rscript -e 'library(covr); covr::codecov()'

after_success:
- Rscript -e 'covr::coveralls()'
- Rscript -e 'covr::codecov()'

addons:
apt:
packages:
- libxml2-dev

notifications:
email: false
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@ Package: samplyzer
Title: What the Package Does (one line, title case)
Version: 0.0.0.9000
Authors@R: person("Xiao", "Li", email = "xiaoli@broadinstitute.org", role = c("aut", "cre"))
Author: Xiao Li
Maintainer: Xiao Li <xiaoli@broadinstitute.org>
Description: What the package does (one paragraph).
Depends: R (>= 3.3.2)
License: What license is it under?
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1.9000
RoxygenNote: 7.2.3
Suggests: knitr,
rmarkdown,
Cairo,
testthat,
covr
Remotes: r-lib/covr
VignetteBuilder: knitr
Imports: class (>= 7.3-14),
ggplot2 (>= 2.2.1),
WriteXLS (>= 4.0.0),
grid (>= 3.3.2),
gridExtra (>= 2.2.1)
gridExtra (>= 2.2.1),
covr
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ S3method(sort,sampleDataset)
export(PCplots)
export(calZscore)
export(flagSamples)
export(geom_split_violin)
export(getAttr)
export(hasAttr)
export(inferAncestry)
export(multiplotWithSharedLegend)
export(outlierPlots)
export(runQcExplorer)
export(sampleDataset)
export(sampleQcPlot)
export(save)
export(scatter)
export(setAttr)
19 changes: 15 additions & 4 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,25 @@ sampleQcPlot.sampleDataset <- function(


#' Produce outlier plot
#' @param sds sample dataset sds
#' @param ... other arguments
#'
#' @export

outlierPlots <- function(...) UseMethod('outlierPlots')

#' @param tab input table with
#' Produce outlier plot
#'
#' @param tab input table with sample information and metrics
#' @param qcMetrics which metrics to plot
#' @param strat by which factor to stratify the dots
#' @param main title of the
#' @return
#' @param main title of the plot
#' @param outliers vector of sample IDs to highlight as outliers
#' @param primaryID the primary ID for labeling
#' @param type type of plot, either 'violin' or 'density'
#' @return a list of outlier plots
#'
#'

outlierPlots.default <- function(tab, qcMetrics, strat, main, outliers,
primaryID=NULL, type='violin'){
Expand Down Expand Up @@ -192,7 +203,7 @@ PCplots <- function (sds, showPlot=T, cor=F, outliers=NULL) {
#' generate multi panel plots
#'
#' @param plotlist a list of plot
#' @param file
#' @param file file
#' @param ncols number of columns in the plot
#'

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# samplyzer
[![Build Status](https://travis-ci.com/xiaoli0/samplyzer.svg?branch=master)](https://travis-ci.org/xiaoli0/samplyzer)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/xiaoli0/samplyzer?branch=master&svg=true)](https://ci.appveyor.com/project/xiaoli0/samplyzer)
[![Coverage Status](https://coveralls.io/repos/github/xiaolicbs/samplyzer/badge.svg?branch=master)](https://coveralls.io/github/xiaolicbs/samplyzer?branch=master)
samplyzer is an R package and Web Application that enables efficient exploration of sample level QC statistics.
[![R CI](https://github.com/x-lab/samplyzer/actions/workflows/ci.yml/badge.svg)](https://github.com/x-lab/samplyzer/actions/workflows/ci.yml)
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/u8scd9ecoe67k9cw?svg=true)](https://ci.appveyor.com/project/1677953017/samplyzer)
[![codecov](https://codecov.io/gh/x-lab/samplyzer/graph/badge.svg?token=eNYYjuMXIw)](https://codecov.io/gh/x-lab/samplyzer)

## Requirements
* R >= 3.3.2
Expand Down
42 changes: 42 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
init:
ps: |
$ErrorActionPreference = "Stop"
Invoke-WebRequest http://raw.githubusercontent.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1"
Import-Module '..\appveyor-tool.ps1'

install:
ps: Bootstrap

# Adapt as necessary starting from here
build_script:
- R -e "install.packages(c('devtools', 'covr', 'ggplot2', 'WriteXLS', 'gridExtra', 'Cairo'), repos='https://cloud.r-project.org/')"
# - travis-tool.sh install_deps

test_script:
- travis-tool.sh run_tests

on_failure:
- travis-tool.sh dump_logs

environment:
my_variable:
secure: dfWwR38iwmYAo9ub0Rg/24EXPUVttaLwhuinDYH3oyIjkt7ozFoyE43t6W9G/w2l #GitHub Access Token

artifacts:
- path: '*.Rcheck\**\*.log'
name: Logs

- path: '*.Rcheck\**\*.out'
name: Logs

- path: '*.Rcheck\**\*.fail'
name: Logs

- path: '*.Rcheck\**\*.Rout'
name: Logs

- path: '\*_*.tar.gz'
name: Bits

- path: '\*_*.zip'
name: Bits
14 changes: 11 additions & 3 deletions man/PCplots.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions man/calZscore.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/calZscore.default.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions man/calZscore.sampleDataset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/dim.sampleDataset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions man/dot-bamQcMetr.Rd

This file was deleted.

13 changes: 13 additions & 0 deletions man/dot-calMaxVcfZ.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions man/dot-multiplotWithSharedLegend.Rd

This file was deleted.

14 changes: 0 additions & 14 deletions man/dot-scatter.Rd

This file was deleted.

11 changes: 11 additions & 0 deletions man/dot-toSameLength.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading