I am trying to go through the following scRNA-seq tutorial.

But the line sce <- newSCESet(countData=all.counts) is not working anymore with the most up-to-date version of scater. Now we should use SingleCellExperiment function instead, so when trying to do the following:

sce <- SingleCellExperiment(assays = list(counts = all.counts))

I am getting the error:

Error in seq_len(ncol(assay)) : 
  argument must be coercible to non-negative integer
In addition: Warning message:
In seq_len(ncol(assay)) : first element used of 'length.out' argument

Any help would be greatly appreciated.

  • 1
    $\begingroup$ You can better ask questions about bioconductor packages on https://support.bioconductor.org/, you'll probably get an answer from Aaron Lun himself within a day. $\endgroup$
    – benn
    Dec 11, 2017 at 8:41
  • $\begingroup$ Which version of R and of the packages are you using? That workflow is for version 3.4 of Bioconductor, and the current version is 3.6 $\endgroup$
    – llrs
    Dec 11, 2017 at 9:05

2 Answers 2


I think you might want to use the most recent workflow, which should be for the latest version on Bioconductor.


You simply need to transform your data.frame into a matrix. Just use these two lines:

sce <- SingleCellExperiment(assays = list(counts = as.matrix(all.counts)))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.