SingleR-inc / SingleR

Clone of the Bioconductor repository for the SingleR package.
https://bioconductor.org/packages/devel/bioc/html/SingleR.html
GNU General Public License v3.0
173 stars 19 forks source link

Generate mock data with correct number of genes #216

Closed ycl6 closed 2 years ago

ycl6 commented 2 years ago

In L48 of the .mockRefData function I reference below:

https://github.com/LTLA/SingleR/blob/d06e65f7b03ef61b7c7b1a670e718ea7900d21ca/R/mockData.R#L48

The default ngenes value is hardcoded, hence it won't generate the correct number of genes if ngenes is changed.

mat <- matrix(rpois(ngenes*length(g), lambda=10*2^means[,g]), ncol=length(g))
LTLA commented 2 years ago

Thanks for spotting this; should be fixed on the latest master and in BioC-devel soon.