From 171de70a8882ec63c2d1fc1d355b00b88f7b890e Mon Sep 17 00:00:00 2001 From: ivokwee Date: Tue, 12 Nov 2024 18:05:16 +0000 Subject: [PATCH] Style code (GHA) --- R/pgx-normalize.R | 2 +- R/pgx-read.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/pgx-normalize.R b/R/pgx-normalize.R index 3b4e5283..3b602f4f 100644 --- a/R/pgx-normalize.R +++ b/R/pgx-normalize.R @@ -208,7 +208,7 @@ pgx.countNormalization <- function(x, methods, ref = NULL, rm.zero = FALSE) { } else if (m == "CPM") { x <- logCPM(x, log = FALSE) } else if (m == "CP10K") { - x <- logCPM(x, total=1e4, log = FALSE) + x <- logCPM(x, total = 1e4, log = FALSE) } else if (m == "TMM") { ## normalization on total counts (linear scale) x <- normalizeTMM(x, log = FALSE) ## does TMM on counts (edgeR) diff --git a/R/pgx-read.R b/R/pgx-read.R index 4ef36f16..ae1f8d19 100644 --- a/R/pgx-read.R +++ b/R/pgx-read.R @@ -56,8 +56,8 @@ read.as_matrix <- function(file, skip_row_check = FALSE, as.char = TRUE, # "val1 val2" # where columns are read ok by fread # but first and last column maintain the " - first_column <- x0[[1]] # Extract the first column - last_column <- x0[[ncol(x0)]] # Extract the last column + first_column <- x0[[1]] # Extract the first column + last_column <- x0[[ncol(x0)]] # Extract the last column if (all(grepl('^"', first_column)) && all(grepl('"$', last_column))) { x0[[1]] <- gsub('^"', "", first_column) x0[[ncol(x0)]] <- as.numeric(gsub('"$', "", last_column))