2 of 5 added 170 characters in body

RSVSim insertions from chr1 to chr2

I tried using the BioConductor forums for asking this question Question on BioConductor. However I do not seem to get an answer there and after some help with other tools on this website, i thought I could also ask the question here, in the hope that someone knows something about it.

I have a reference genome, and I need to put in some structural variations. It is really easy to do in RSVSim, and used it quite a lot already.

However, when processing INS, I found out that it just copies a DNA seq from one part, and puts it somewhere else in the same DNA seq (Bascially a DUP then), or if you specify another an extra DNAseq, to cut from, It randomly cuts from either chr1 or chr2 and puts it in the other. This creates deletions in the DNA seq I want to investigate, which is not what I want.

Does anyone know how to get this kind of result?

width seq                                                                                                                           names               

to this:

width seq                                                                                                                           names               
[1]    32 AAAAAAAAAAAAAAAATTTTTTTTTTTTTTTT                    chr1

And do it 30 times, randomly in the genome? (so take a seq from chr1 and put an insertion in chr2.

I tried this and more already for days, and I just cannot figure it out.


    seq_random <- readDNAStringSet("/path/random.fasta", "fasta")
    seq_ref <- readDNAStringSet("/path/reference1MB.fasta", "fasta")
    genome2 = DNAStringSet(c(seq_random, seq_ref))
    names(genome2) = c("chr1","chr2")

    y <- c(30, 30, 30, 30, 30, 50, 50, 50, 50, 50, 100, 100, 100, 100, 100, 500, 500, 500, 500, 500, 1000, 1000, 1000, 1000, 1000, 5000, 5000, 5000, 5000, 5000)

    length_seq = width(genome2[2])
    knownInsertion = GRanges(IRanges(0,length_seq), seqnames="chr2")
    knownInsertion = GRanges(IRanges(0,length_seq), seqnames="chr1", chrB="chr2", chrA="chr1")
    knownInsertion = GRanges(seqnames="chr1", chrB="chr2")
    sim = simulateSV(output='/folder/of/output/', genome=genome2, 
                     ins = 30, sizeIns=y, regionsIns=knownInsertion)