Skip to content

Commit

Permalink
Merge branch 'cansavvy/datasetup' of https://github.com/FredHutch/gimap
Browse files Browse the repository at this point in the history
… into cansavvy/datasetup
  • Loading branch information
cansavvy committed Jan 31, 2024
2 parents f79b448 + add7a3f commit 655a7fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/00-setup_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ setup_data <- function(counts = NULL, pg_metadata = NULL, sample_metadata = NULL
new_data$coverage <- new_data$counts_per_sample/nrow(counts)

# Transform the data
new_data$transformed_data$count_norm <- -log10((counts + 1)/sum(counts))
new_data$transformed_data$count_norm <- apply(counts, 2, function(x) -log10((x+1)/sum(x)))
new_data$transformed_data$cpm <- apply(counts, 2, function(x) (x/new_data$counts_per_sample)*1e6)
new_data$transformed_data$log2_cpm <- log2(new_data$cpm +1)

Expand Down

0 comments on commit 655a7fb

Please sign in to comment.