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_experiment cannot handle 0 counts in transcripts #28

Open roryk opened 8 years ago

roryk commented 8 years ago

It throws this error if any readspertx counts are zero:

simulate_experiment(fasta_file, reads_per_transcript=readspertx,
                    num_reps=c(10,10), fold_changes=fold_changes,
                    outdir='simulated_reads')
Error in rep(seq_len(length(x)), ...) : invalid 'times' argument
In addition: There were 20 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In rnbinom(n = length(basemeans), mu = basemeans, size = size) : NAs produced
anwarMZ commented 7 years ago

Hi, Any update to using simulate_experiment with 0 counts in transcripts. i want to generate some samples with 0 counts for a particular transcript Thanks

aarzalluz commented 6 years ago

I've had a similar issue with 0 counts in transcripts, has this been solved yet?

I know it's a relatively easy fix to just remove zero counts from the count matrix before running simulate_experiment... but it would make it a lot easier if the package tolerated 0 values. Sometimes counts for several samples are in a table where some transcripts are expressed in some samples although not in others. When this is the case, simulating using just the desired column of the data is quick and easy, while editing both the input transcripts file and the count matrix for every sample is, in my view, a really slow way around it.

Thanks,

Ángeles