Polyester - creating simulated reads based on raw count matrix
0
0
Entering edit mode
sseo2 • 0
@sseo2-13695
Last seen 7.3 years ago

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")]
head(WTveh_poly)

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)[1], n=dim(WTveh_poly)[2], 
                                     seed=100000)

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
 [1] polyester_1.12.0           ballgown_2.8.4             sva_3.24.4                
 [4] BiocParallel_1.10.1        genefilter_1.58.1          mgcv_1.8-18               
 [7] nlme_3.1-131               BiocInstaller_1.26.0       RColorBrewer_1.1-2        
[10] pheatmap_1.0.8             stringr_1.2.0              dplyr_0.5.0               
[13] DESeq2_1.16.1              SummarizedExperiment_1.6.1 DelayedArray_0.2.2        
[16] matrixStats_0.52.2         Biobase_2.36.2             GenomicRanges_1.28.2      
[19] GenomeInfoDb_1.12.0        IRanges_2.10.1             S4Vectors_0.14.1          
[22] BiocGenerics_0.22.0        readr_1.1.1                biomaRt_2.32.0      

 

Thanks in advances 

polyester rnaseq simulation • 1.3k views
ADD COMMENT

Login before adding your answer.

Traffic: 560 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6