Skip to content

Commit 3c680bb

Browse files
authored
Merge pull request #84 from uclahs-cds/nzeltser-increment-version-3.1.0
increment version 3.1.0
2 parents 5e5ffb6 + 7cce79c commit 3c680bb

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ApplyPolygenicScore
22
Type: Package
33
Title: Utilities for the Application of a Polygenic Score to a VCF
4-
Version: 3.0.2
4+
Version: 3.1.0
55
Authors@R: c(
66
person('Paul', 'Boutros', role = 'cre', email = '[email protected]'),
77
person('Nicole', 'Zeltser', role = 'aut', comment = c(ORCID = '0000-0001-7246-2771')),

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Unreleased
22

33
# ApplyPolygenicScore unreleased
4+
5+
# ApplyPolygenicScore 3.1.0
6+
47
## Changed
58
* Fixed regression of combine.vcf.with.pgs() function that prevented it from handling multiple rsIDs on the same line.
69
* Fixed bug caused by the case of a sample-specific missing variant at a multiallelic site

R/plot-pgs.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ create.pgs.density.plot <- function(
406406
#' @param filename.prefix character prefix for output filenames
407407
#' @param file.extension character file extension for output plots
408408
#' @param tidy.titles logical whether to reformat PGS plot titles to remove periods
409+
#' @param alpha numeric alpha value for stripplot points, defaults to 0.5
409410
#' @param width numeric width of output plot in inches
410411
#' @param height numeric height of output plot in inches
411412
#' @param xaxes.cex numeric size for all x-axis labels
@@ -467,6 +468,7 @@ create.pgs.boxplot <- function(
467468
filename.prefix = NULL,
468469
file.extension = 'png',
469470
tidy.titles = FALSE,
471+
alpha = 0.5,
470472
width = 10,
471473
height = 10,
472474
xaxes.cex = 1.5,
@@ -530,8 +532,10 @@ create.pgs.boxplot <- function(
530532
data = pgs.data,
531533
add.stripplot = add.stripplot,
532534
jitter.factor = jitter.factor,
535+
points.alpha = alpha,
533536
xlab.label = NULL,
534537
ylab.label = pgs.column.main,
538+
ylab.cex = titles.cex,
535539
# main = NULL,
536540
# main.cex = titles.cex,
537541
yaxis.cex = yaxes.cex,
@@ -584,6 +588,7 @@ create.pgs.boxplot <- function(
584588
boxplot.colors <- 'black';
585589
} else {
586590
boxplot.colors <- suppressWarnings(BoutrosLab.plotting.general::default.colours(length(levels(pgs.data[ , phenotype]))));
591+
names(boxplot.colors) <- levels(pgs.data[ , phenotype]);
587592
}
588593
# plot boxplot
589594
group.yaxis.formatting <- basic.yaxis.formatting;
@@ -592,14 +597,17 @@ create.pgs.boxplot <- function(
592597
data = pgs.data,
593598
add.stripplot = add.stripplot,
594599
jitter.factor = jitter.factor,
600+
points.alpha = alpha,
595601
xlab.label = phenotype,
596602
ylab.label = pgs.column.main,
597603
xlab.cex = titles.cex,
604+
ylab.cex = titles.cex,
598605
yaxis.cex = yaxes.cex,
599606
xaxis.cex = xaxes.cex,
600607
yat = group.yaxis.formatting$at,
601608
yaxis.lab = group.yaxis.formatting$axis.lab,
602-
col = boxplot.colors
609+
points.col = boxplot.colors[pgs.data[ , phenotype]] # color points by phenotype
610+
#col = boxplot.colors
603611
);
604612
}
605613
}

man/create.pgs.boxplot.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-plotting.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# plotting functions take a long time to run, this var toggles off plotting tests for faster testing
2-
SKIP.PLOTS <- TRUE#FALSE;
3-
SKIP.COMPREHENSIVE.CASES <- TRUE#FALSE;
2+
SKIP.PLOTS <- FALSE;
3+
SKIP.COMPREHENSIVE.CASES <- FALSE;
44
skip.plotting.tests <- function(skip.plots = FALSE) {
55
if (skip.plots) {
66
skip('Plotting tests disabled');

0 commit comments

Comments
 (0)