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

GCbias discrepancy #67

Open Glfrey opened 5 years ago

Glfrey commented 5 years ago

Hi there,

I seem to be encountering a problem with polyester where an error message reports a discrepancy between the length of the gc bias and the sum of numreps "length(extras$gcbias) == sum(num_reps) is not TRUE", however I can't seem to correct this error as R reports they are indeed equal "length(biases) == sum(num_reps)[1] TRUE".

My commands are:

fastapath = ('/path/to/fastafile') <- has 10 sequences within numtx = count_transcripts(fastapath) <- [1] 10 transcripts = readDNAStringSet(fastapath) <- "A DNAStringSet instance of length 10" readmat= matrix(readspertx, nrow=numtx, ncol=10) set.seed(137) biases = sample(0:7, 10, replace=TRUE) readmat_biased = add_gc_bias(readmat, as.list(biases), transcripts)

confirming they're equal: sum(num_reps) - [1] 10 length(biases) - [1] 10

Then I run

simulate_experiment('/path/to/fastafile', reads_per_transcript=readspertx, num_reps=c(5,5), fold_changes = fold_changes, distr = 'empirical',outdir='bias_gc_sim', gcbias = 'biases')

Which returns the error message "length(extras$gcbias) == sum(num_reps) is not TRUE".

I'd be very grateful into any insight into the issues.

Gill