This is a test version of Biostars. For the public version, visit https://www.biostars.org.
RSVSim cannot simulate duplications

Hello,

I am trying to simulate some SVs using RSVSim. I can simulate both deletions and insertions at the same time, but the problem comes when I want to introduce duplications.

This is the code that I use:

sim = simulateSV(output='.', genome=genome, chrs = "chr12", ins = 150, sizeIns = sizeins, dels = 150, sizeDels = sizedels, dups = 150, sizeDups = sizedups)

The genome variable is the plain text ucsc hg 19 version. Size params are vectors of 150 random lengths between 20 to 200 bp.

The error that it throws is:

Loading genome from FASTA file: /home/bernat/reference/ucsc.hg19.fasta
Breakpoints will be distributed uniformly across the genome
Error in sample.int(length(x), size, replace, prob) : 
cannot take a sample larger than the population when 'replace = FALSE'

Does any know why is this happening?

simulation software error genome

1 answer

I had the same issue with RSVsim version 1.10 (it was the default installed by bioconductor for R3.2). I installed RSVsim version 1.12 from source, and the issue was resolved.

Log in to answer this question.