-
Notifications
You must be signed in to change notification settings - Fork 51
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
Trouble changing size parameter #37
Comments
Hey there, the documentation for that function describes the following for size
Does that clear up what you might need? |
Thanks for your quick reply. I really appreciate your help. It's possible I'm mis-reading something in the documentation, but my interpretation is you can provide one of two inputs for the size argument:
fastapath = system.file("extdata", "chr22.fa", package="polyester")
fastapath = system.file("extdata", "chr22.fa", package="polyester") Both routes result in the same error: Error in simulate_experiment(fastapath, reads_per_transcript = 10, fold_changes = fold_changes, : It seems providing a numeric vector with length equal to the number of transcripts in the fasta is not working. Please correct me if I'm incorrectly interpreting the documentation. It may be helpful if you could provide some example code where you've modified the size parameter. Thanks again! |
It does look like you're adjusting the parameter correctly according to the documentation. I'll take a look at this when I get a chance (likely sometime in the next week, unless @JMF47 can get to it sooner). |
Working on fixing this now! One update I have is that, per the documentation,
(compare to your code in the original comment; note the class of That said, there should be better error-handling there (the message should have told you that your fold change argument's dimensions didn't match your group dimensions). Also, you should be able to have just one group and change the size parameter. I'm adding those two features now (the latter is a bug). edit: I realize you are actually allowed to provide a vector of fold changes with two groups -- I forgot I hadn't removed that functionality! Looking into it. |
OK, I've fixed this (rather uglily) in #39. Will test more thoroughly and deploy to BioC shortly. Sorry for the confusion! |
I'm attempting to run the "simulate_experiment" command function by following the associated help file except changing the size parameter as follows:
fastapath = system.file("extdata", "chr22.fa", package="polyester")
numtx = count_transcripts(fastapath)
set.seed(4)
fold_changes = sample(c(0.5, 1, 2), size=numtx, prob=c(0.05, 0.9, 0.05), replace=TRUE)
simulate_experiment(fastapath, reads_per_transcript=10,fold_changes=fold_changes, outdir='simulated_reads', seed=12, size=10)
This results in the following error:
Error in matrix(size, nrow = nrow(basemeans), ncol = ncol(basemeans)) : non-numeric matrix extent
This error happens when providing a vector of sizes for each transcript like so:
simulate_experiment(fastapath, reads_per_transcript=10,fold_changes=fold_changes, outdir='simulated_reads', seed=12, size=(10*fold_changes/3))
Am I formatting the size parameter correctly?
The text was updated successfully, but these errors were encountered: