alyssafrazee / polyester

Bioconductor package "polyester", devel version. RNA-seq read simulator.
http://biorxiv.org/content/early/2014/12/12/006015
89 stars 51 forks source link

simulate_experminent crashes #23

Closed FabianGrammes closed 9 years ago

FabianGrammes commented 9 years ago

Hi

I'm trying to simulate reads, actually quite a lot of reads ~9 millions. I'm using the following parameters:

simulate_experiment(<my transcriptome.fa>,
                    reads_per_transcript = <my counts> , 
                    num_reps = c(10,10),
                    fold_changes = <my fold changes>,
                    paired = TRUE,
                    readlen = 150,
                    fraglen = 400,
                    fragsd = 25,
                    bias = 'cdnaf' ) 

However I'm getting the following error message:

Error in .Call(.NAME, ..., PACKAGE = PACKAGE) : 
  negative length vectors are not allowed
Calls: simulate_experiment ... add_error -> <Anonymous> -> <Anonymous> -> .Call2 -> .Call
Execution halted

Do you have an idea what could cause this issue ? I'm suspecting that when simulating that many reads, short fragments may cause trouble...

Here is the sessionInfo:

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: CentOS release 6.7 (Final)

locale:
[1] C

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
[1] Biostrings_2.36.1   XVector_0.8.0       IRanges_2.2.5      
[4] S4Vectors_0.6.2     BiocGenerics_0.14.0 polyester_1.4.0    

loaded via a namespace (and not attached):
[1] zlibbioc_1.14.0 limma_3.24.14   logspline_2.1.8

Thanks, Fabian

alyssafrazee commented 9 years ago

The error message negative length vectors are not allowed in R means that R has run out of memory. To work around this, I recommend doing separate simulate_experiment calls from small parts of your transcriptome fasta file (say, 10 or 100 transcripts), and concatenating the resulting output fasta files together at the end.