I am trying to generate some simulated counts based on a pilot data we have to determine if increasing the number of samples will give us more power in our experiments.
I have a matrix of raw counts containing gene names on rows and sample names in columns and from this I want to use create_read_numbers function from polyester to generate additional simulated samples. However this comes up with an error and I can't understand what is wrong with it. Any ideas?
The code I am running is as below
WTveh_poly <- Counts[,c("WTVEH1IP","WTVEH2IP","WTVEH3IP")]
WTveh_poly <- subset(WTveh_poly, rowMeans(WTveh_poly) > 1)
params = get_params(WTveh_poly)
custom_readmat = create_read_numbers(mu=params$mu, fit=params$fit,
p0=params$p0, m=dim(WTveh_poly), n=dim(WTveh_poly),
then the output is
Generating data from baseline model. Error in sample.int(length(x), size, replace, prob) : cannot take a sample larger than the population when 'replace = FALSE'
Here is my session info
R version 3.4.1 (2017-06-30) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 14.04.5 LTS
 polyester_1.12.0 ballgown_2.8.4 sva_3.24.4  BiocParallel_1.10.1 genefilter_1.58.1 mgcv_1.8-18  nlme_3.1-131 BiocInstaller_1.26.0 RColorBrewer_1.1-2  pheatmap_1.0.8 stringr_1.2.0 dplyr_0.5.0  DESeq2_1.16.1 SummarizedExperiment_1.6.1 DelayedArray_0.2.2  matrixStats_0.52.2 Biobase_2.36.2 GenomicRanges_1.28.2  GenomeInfoDb_1.12.0 IRanges_2.10.1 S4Vectors_0.14.1  BiocGenerics_0.22.0 readr_1.1.1 biomaRt_2.32.0
Thanks in advances