limfuxing / ruvIIInb

This package removes unwanted variation from raw sequencing count data using Negative Binomial and/or Zero Inflated Negative Binomial model. Thus far, the package has been applied to remove unwanted variation from single-cell RNA-seq and shotgun metagenomics data. The package takes raw sequencing count as input and thus in principle can be applied to data from any sequencing platforms.
18 stars 2 forks source link

Subsetting Error if Dataset Has One Cell Type #16

Closed DarioS closed 4 months ago

DarioS commented 4 months ago

I have an scRNA-seq dataset of patient-derived fibroblast cell cultures. The code does not handle the case of just one cell type.

fastruvIII.nb(delayedCounts, matrix(1, nrow = ncol(delayedCounts)), ctl = scSEG, batch = SCE$batch)
    ...        ...
[1] "Estimating W for all samples..."
[1] "Estimating Mb...."
Error in apply(M[idx.annot, ], 1, which) : 
  dim(X) must have a positive length
limfuxing commented 4 months ago

I have just fixed the issue. The new version on GitHub (0.9.2.1) can now work with single-column M matrix but will issue a warning. Please let me know if the new version fixed your issue.

DarioS commented 4 months ago

It works.