scRNA.seq.course icon indicating copy to clipboard operation
scRNA.seq.course copied to clipboard

Question about Exercise 2 in section 5.2.3 (Matrix Statistics)

Open BAREJAA opened this issue 3 years ago • 0 comments

For this question -

"Create a new assay called “cpm” (Counts-Per-Million), which contains the result of dividing the counts matrix by the total counts in millions."

The course's answer is - assay(tung, "cpm") <- counts(tung)/tung$total_counts/1e6

Shouldn't it be - assay(tung, "cpm") <- sweep(counts(tung), 2, tung$total_counts, "/")/1e6

?

p.s. This is a wonderful course/book!!

BAREJAA avatar Feb 17 '22 23:02 BAREJAA