Body: <p>I need to perform differential expression analysis using the <a href="https://rdrr.io/bioc/scDD/f/inst/doc/scDD.pdf" rel="nofollow noreferrer">scDD package</a> from R, but I am not able to since I miss the <strong>normcounts</strong> assay in my SCE object (of course in the example they show, the assay is already there).</p>
  <p>As I found out in the preprocessing steps, one can use <a href="https://rdrr.io/bioc/scDD/man/preprocess.html" rel="nofollow noreferrer">this function</a> to generate the missing assay, except that it does not work:</p>
  <pre><code># this is the SCE object
  &gt; cTSubSet
  class: SingleCellExperiment 
  dim: 19767 149 
  metadata(2): Samples Samples
  assays(2): counts logcounts
  rownames(19767): Xkr4 Gm19938 ... CAAA01147332.1 AC149090.1
  rowData names(4): ID Symbol Type chrLoc
  colnames(149): AAAGGATGTTCACGAT-1 AACCATGTCTTTCGAT-1 ...
    TGTGGCGTCTCTTAAC-1 TTTGGTTAGACGCTCC-1
  colData names(17): Sample Barcode ... slm_1 slm_1.5
  reducedDimNames(0):
  mainExpName: NULL
  altExpNames(0):
  
  # setting parameters as suggested in the vignette linked above
  &gt; paR &lt;- list(alpha=0.01, mu0=0, s0=0.01, a0=0.01, b0=0.01)
  # setting zero.thresh to zero since I already removed unwanted genes
  &gt; cTSubSet &lt;- preprocess(cTSubSet, zero.thresh=0, scran_norm=TRUE)
  
  # the not so useful error:
  Performing scran Normalization
  Error in t.default(Data) : argument is not a matrix
  </code></pre>
  <p>I was also looking for other possible ways of obtaining such <strong>normcounts</strong> assay and I found <a href="https://bioconductor.org/packages/devel/bioc/vignettes/SingleCellExperiment/inst/doc/intro.html" rel="nofollow noreferrer">this description</a>:</p>
  <blockquote>
  <p>normcounts: Normalized values on the same scale as the original
  counts. For example, counts divided by cell-specific size factors that
  are centred at unity.</p>
  </blockquote>
  <p>Still, I can't figure out what this may mean. Is there a way of obtaining such <strong>normcounts</strong>?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-17T10:31:48.990Z
Comments.Text: You might as well try [monocle3::normalized_count](https://rdrr.io/github/cole-trapnell-lab/monocle3/man/normalized_counts.html).
  It takes SingleCellExperiment object.
Comments.UserDisplayName: littleworth
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-18T12:01:01.447Z
Comments.Text: yep that is a possibility. I actually found another one using edgeR, i.e.
  `y <- DGEList(counts=(counts(cTSubSet)), group=cTSubSet$condition)`
  `y <- calcNormFactors(y)`
  however, I am still working on this
Comments.UserDisplayName: gbt
Tags: <r><rna-seq><scrnaseq>
Title: how to get normcounts for singlecellexperiment object?
ThreadText: # how to get normcounts for singlecellexperiment object?
  
  (Asked by: username_0 on 2021-06-17)
  
  I need to perform differential expression analysis using the [scDD package](https://rdrr.io/bioc/scDD/f/inst/doc/scDD.pdf) from R, but I am not able to since I miss the **normcounts** assay in my SCE object (of course in the example they show, the assay is already there).
  
  As I found out in the preprocessing steps, one can use [this function](https://rdrr.io/bioc/scDD/man/preprocess.html) to generate the missing assay, except that it does not work:
  
  ```
  # this is the SCE object
  > cTSubSet
  class: SingleCellExperiment 
  dim: 19767 149 
  metadata(2): Samples Samples
  assays(2): counts logcounts
  rownames(19767): Xkr4 Gm19938 ... CAAA01147332.1 AC149090.1
  rowData names(4): ID Symbol Type chrLoc
  colnames(149): AAAGGATGTTCACGAT-1 AACCATGTCTTTCGAT-1 ...
    TGTGGCGTCTCTTAAC-1 TTTGGTTAGACGCTCC-1
  colData names(17): Sample Barcode ... slm_1 slm_1.5
  reducedDimNames(0):
  mainExpName: NULL
  altExpNames(0):
  
  # setting parameters as suggested in the vignette linked above
  > paR <- list(alpha=0.01, mu0=0, s0=0.01, a0=0.01, b0=0.01)
  # setting zero.thresh to zero since I already removed unwanted genes
  > cTSubSet <- preprocess(cTSubSet, zero.thresh=0, scran_norm=TRUE)
  
  # the not so useful error:
  Performing scran Normalization
  Error in t.default(Data) : argument is not a matrix
  
  ```
  
  I was also looking for other possible ways of obtaining such **normcounts** assay and I found [this description](https://bioconductor.org/packages/devel/bioc/vignettes/SingleCellExperiment/inst/doc/intro.html):
  
  > normcounts: Normalized values on the same scale as the original
  > counts. For example, counts divided by cell-specific size factors that
  > are centred at unity.
  
  Still, I can't figure out what this may mean. Is there a way of obtaining such **normcounts**?
  
  **Tags:** r, rna-seq, scrnaseq
  
  > **Comments:**
  > **username_1**: You might as well try [monocle3::normalized_count](https://rdrr.io/github/cole-trapnell-lab/monocle3/man/normalized_counts.html). It takes SingleCellExperiment object.  
  > **username_0**: yep that is a possibility. I actually found another one using edgeR, i.e. `y <- DGEList(counts=(counts(cTSubSet)), group=cTSubSet$condition)` `y <- calcNormFactors(y)` however, I am still working on this  
  
  ---
  
  ## 0 answers
  
  