Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bigomics/playbase
Browse files Browse the repository at this point in the history
  • Loading branch information
ivokwee committed Nov 13, 2024
2 parents fbae691 + 171de70 commit d3dbc3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/pgx-normalize.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions R/pgx-read.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d3dbc3f

Please sign in to comment.