alyssafrazee / polyester

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

basemeans in simulate_experiment when num_rep == 1 #62

Open orangebromeliad opened 5 years ago

orangebromeliad commented 5 years ago

Hi,

I only wanted to generate one simulated replicate however I was encountering issues with this because it would return the error: 'Object basemeans not found'. I notice that in the simulate_experiment code that I have (I downloaded polyester a couple of days ago from Bioconductor) if num_reps == 1 then basemeans is never defined, however the code on GitHub has fixed this bug (I think). Is polyester still awaiting updates on bioconductor?

Best wishes, Tim.

Code from my version of polyester v.3.8: line 47

if (length(num_reps) == 1) {
    fold_changes = matrix(rep(1, length(transcripts)))
  }

Github code: line 368

if(length(num_reps) == 1){
        fold_changes = matrix(rep(1, length(transcripts)))
        basemeans = reads_per_transcript * fold_changes
    } else if(length(num_reps) == 2) {
JMF47 commented 5 years ago

Hi Tim. Let me look into this. It’s likely a case of updates not being pushed on my end successfully to the bioconductor build. Thanks!

alorchhota commented 5 years ago

I am having an issue to simulate RNA-seq from a single group using simulate_experiment(). I believe my issue is similar to this one, so I'm posting it here.

As this is about a single group, I thought I could avoid passing any value for fold_changes. But it resulted in the following error.



Error in is.numeric(fold_changes) : argument "fold_changes" is missing, with no default



Next I tried passing fold_changes = NULL which produced the following error.

Error in .check_fold_changes(fold_changes, num_reps, transcripts) : is.numeric(fold_changes) is not TRUE

Then I tried passing fold_changes = 1 which resulted in the following error. Setting fold_changes = matrix(1, nrow = n_transcripts, ncol = 1) also generates the same error. This part is, I believe, related to the issue mentioned by Tim.

Error in simulate_experiment(gtf = tx_gtf_fn, seqpath = dna_dir, outdir = out_dir, :
object 'basemeans' not found

FYI: I'm using polyester_1.18.0.