Skip to content

Commit

Permalink
Style code (GHA)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivokwee committed Dec 30, 2024
1 parent c58cc47 commit 677ef15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/pgx-contrasts.R
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ contrasts.convertToLabelMatrix <- function(contrasts, samples) {
all(apply(contrasts, 2, class) %in% c("integer", "numeric"))
is.numeric.contrast <- is.numeric.matrix | is.numeric.df
if (is.numeric.contrast) {
has.negpos <- any(contrasts < 0, na.rm=TRUE) && any(contrasts > 0, na.rm=TRUE)
has.negpos <- any(contrasts < 0, na.rm = TRUE) && any(contrasts > 0, na.rm = TRUE)
if (has.negpos) {
contrasts[contrasts %in% c(NA, "NA", "na", "")] <- 0
contrasts <- sign(contrasts)
Expand Down
6 changes: 3 additions & 3 deletions R/pgx-read.R
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ read_files <- function(dir = ".", pattern = NULL) {
file2 <- head(grep("sample", ff, value = TRUE), 1)
file3 <- head(grep("contrast|comparison", ff, value = TRUE), 1)
counts <- samples <- contrasts <- NULL
if (length(file1)) counts <- read_counts(file.path(dir,file1))
if (length(file2)) samples <- read_samples(file.path(dir,file2))
if (length(file3)) contrasts <- read_contrasts(file.path(dir,file3))
if (length(file1)) counts <- read_counts(file.path(dir, file1))
if (length(file2)) samples <- read_samples(file.path(dir, file2))
if (length(file3)) contrasts <- read_contrasts(file.path(dir, file3))

list(
counts = counts,
Expand Down

0 comments on commit 677ef15

Please sign in to comment.