Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using `apply(counts, 2, function(x) (x/new_data$counts_per_sample)*1e6)` means that every calculation was using the first sample count from `new_data$counts_per_sample` as the divisor. When comparing this code to the original, use of `new_data$counts_per_sample` leads to only 34641 of the 165850 values matched between the two repos. Replacing the pre-calculated sums with `sum(x)` brought them into alignment. For the log2 cpm calculation `log2(new_data$cpm +1)` leads to all zeros because there is no data in `new_data$cpm`. Replacing it with `new_data$transformed_data$cpm` points to the correct information and fixes this problem. These changes were originally made on my qc branch in early Feb and buried under the rest of the changes, so suggesting them here separately so they can be incorporated now.
- Loading branch information