Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcbias argument in simulate experiment #55

Open
Aslic opened this issue Apr 13, 2018 · 1 comment
Open

gcbias argument in simulate experiment #55

Aslic opened this issue Apr 13, 2018 · 1 comment

Comments

@Aslic
Copy link

Aslic commented Apr 13, 2018

Hi Alyssa,

I am using polyester package to simulate counts with and without GC bias for 16 samples (8 per group). I am using integers that correspond to Loess models that come with the package. This is how I generated the array:

cg_model<-sample(0:7,16,replace = TRUE)

And then I simulate the experiment:

simulate_experiment('chr22_shuffled.fa', num_reps=c(8,8), reads_per_transcript=basereads, fold_changes=foldm[[1]], outdir='simulated_readswBias', paired = FALSE, gcbias = as.list(cg_model), seed=1234)
And get this error

Error in simulate_experiment("chr22_shuffled.fa", num_reps = c(8, 8), : gc bias parameters must be integers 0 through 7 or loess objects

Parameters are definitely integers. I also tried to enter gcbias as an array to no avail. The code runs beautifully without the gcbias parameter. Any clue as to what is wrong?

Thank you. Any help is appreciated.

@warrenmcg
Copy link
Contributor

Hi @Aslic, your call to simulate_experiment has this for gcbias: gcbias = as.list(cg_model). The function is expecting a numeric vector, but you are sending it a list. cg_model is already a numeric vector, so you can send it in directly like so: gcbias = cg_model. That should solve your problem, but if you are still getting an error, then come back and explain what you see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants