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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ApplyPolygenicScore
Type: Package
Title: Utilities for the Application of a Polygenic Score to a VCF
Version: 3.0.2
Version: 3.1.0
Authors@R: c(
person('Paul', 'Boutros', role = 'cre', email = 'PBoutros@mednet.ucla.edu'),
person('Nicole', 'Zeltser', role = 'aut', comment = c(ORCID = '0000-0001-7246-2771')),
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Unreleased

# ApplyPolygenicScore unreleased

# ApplyPolygenicScore 3.1.0

## Changed
* Fixed regression of combine.vcf.with.pgs() function that prevented it from handling multiple rsIDs on the same line.
* Fixed bug caused by the case of a sample-specific missing variant at a multiallelic site
Expand Down
10 changes: 9 additions & 1 deletion R/plot-pgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ create.pgs.density.plot <- function(
#' @param filename.prefix character prefix for output filenames
#' @param file.extension character file extension for output plots
#' @param tidy.titles logical whether to reformat PGS plot titles to remove periods
#' @param alpha numeric alpha value for stripplot points, defaults to 0.5
#' @param width numeric width of output plot in inches
#' @param height numeric height of output plot in inches
#' @param xaxes.cex numeric size for all x-axis labels
Expand Down Expand Up @@ -467,6 +468,7 @@ create.pgs.boxplot <- function(
filename.prefix = NULL,
file.extension = 'png',
tidy.titles = FALSE,
alpha = 0.5,
width = 10,
height = 10,
xaxes.cex = 1.5,
Expand Down Expand Up @@ -530,8 +532,10 @@ create.pgs.boxplot <- function(
data = pgs.data,
add.stripplot = add.stripplot,
jitter.factor = jitter.factor,
points.alpha = alpha,
xlab.label = NULL,
ylab.label = pgs.column.main,
ylab.cex = titles.cex,
# main = NULL,
# main.cex = titles.cex,
yaxis.cex = yaxes.cex,
Expand Down Expand Up @@ -584,6 +588,7 @@ create.pgs.boxplot <- function(
boxplot.colors <- 'black';
} else {
boxplot.colors <- suppressWarnings(BoutrosLab.plotting.general::default.colours(length(levels(pgs.data[ , phenotype]))));
names(boxplot.colors) <- levels(pgs.data[ , phenotype]);
}
# plot boxplot
group.yaxis.formatting <- basic.yaxis.formatting;
Expand All @@ -592,14 +597,17 @@ create.pgs.boxplot <- function(
data = pgs.data,
add.stripplot = add.stripplot,
jitter.factor = jitter.factor,
points.alpha = alpha,
xlab.label = phenotype,
ylab.label = pgs.column.main,
xlab.cex = titles.cex,
ylab.cex = titles.cex,
yaxis.cex = yaxes.cex,
xaxis.cex = xaxes.cex,
yat = group.yaxis.formatting$at,
yaxis.lab = group.yaxis.formatting$axis.lab,
col = boxplot.colors
points.col = boxplot.colors[pgs.data[ , phenotype]] # color points by phenotype
#col = boxplot.colors

Copilot AI Jul 22, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented-out code. Dead code should be deleted rather than commented out to maintain code cleanliness.

Suggested change
#col = boxplot.colors

Copilot uses AI. Check for mistakes.
);
}
}
Expand Down
3 changes: 3 additions & 0 deletions man/create.pgs.boxplot.Rd

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

4 changes: 2 additions & 2 deletions tests/testthat/test-plotting.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# plotting functions take a long time to run, this var toggles off plotting tests for faster testing
SKIP.PLOTS <- TRUE#FALSE;
SKIP.COMPREHENSIVE.CASES <- TRUE#FALSE;
SKIP.PLOTS <- FALSE;
SKIP.COMPREHENSIVE.CASES <- FALSE;
skip.plotting.tests <- function(skip.plots = FALSE) {
if (skip.plots) {
skip('Plotting tests disabled');
Expand Down
Loading