3

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.

llrs
  • 4,693
  • 1
  • 18
  • 42
Nikita Vlasenko
  • 2,558
  • 3
  • 26
  • 38

2 Answers2

5

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

Konrad Rudolph
  • 4,845
  • 14
  • 45
Nils
  • 315
  • 1
  • 7
1

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

library(SingleCellExperiment)
sce <- SingleCellExperiment(assays = list(counts = as.matrix(all.counts)))
M. Aburidi
  • 11
  • 1