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

Error when simulating more samples with splatPop #125

Closed
wanghao98 opened this issue Oct 26, 2021 · 2 comments
Closed

Error when simulating more samples with splatPop #125

wanghao98 opened this issue Oct 26, 2021 · 2 comments
Assignees
Labels

Comments

@wanghao98
Copy link

wanghao98 commented Oct 26, 2021

Hi, in the tutorial, samples = 5 was used to simulate data. When I tried to increase sample size to more than 20, I had the following error:

Error in sample.int(length(x), size, replace, prob) : invalid first argument

Here is the Code I used:

vcf = mockVCF(n.sample = 40)
gff <- mockGFF()

params.cond <- newSplatPopParams(eqtl.n = 0.5, 
                                 batchCells = 100,
                                 similarity.scale = 5,
                                 condition.prob = c(0.5, 0.5),
                                 eqtl.condition.specific = 0.5,
                                 cde.facLoc = c(0.5, 0.5), 
                                 cde.facScale = c(0.5, 0.5))
sim.pop.cond <- splatPopSimulate(vcf = vcf, gff = gff, params = params.cond, 
                                 sparsify = FALSE)

Thank you for looking into this!

@lazappi lazappi changed the title Error occurs when simulate more samples Error when simulating more samples with splatPop Oct 26, 2021
@lazappi lazappi added the bug label Oct 26, 2021
@azodichr
Copy link
Collaborator

Thanks for bringing this to our attention @wanghao98! I've looked into the problem and found a minor code bug that was causing it. I have pushed the fix to @lazappi to review and once accepted you should be able to install the updated package from github. Let us know if you have any more trouble with splatPop!

@lazappi lazappi closed this as completed in 540b80a Nov 2, 2021
@lazappi
Copy link
Collaborator

lazappi commented Nov 2, 2021

@wanghao98 This should be fixed now and will be in the current Bioconductor release (3.14) and devel (3.15) soon. If you haven't updated to the new Bioconductor version yet you can install it from GitHub.

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

No branches or pull requests

3 participants