polyester icon indicating copy to clipboard operation
polyester copied to clipboard

simulate_experiment cannot handle 0 counts in transcripts

Open roryk opened this issue 10 years ago • 2 comments

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

roryk avatar Nov 04 '15 04:11 roryk

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

anwarMZ avatar Jul 05 '17 14:07 anwarMZ

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

aarzalluz avatar Sep 28 '17 10:09 aarzalluz