Question: Simulated CNVs maintaining size
0
gravatar for Crisr
10 weeks ago by
Crisr0
Spain
Crisr0 wrote:

I would like to generate a random distribution of simulated CNVs to compare with my original data (chr, start, end position). I would like to maintain the same chromosome and in addition to keep fixed the length of each CNV only changing its start/end positions. I am wondering how it is the easiest and correct way to do that. I know the bedtools random and shuffle options but neither of them allowing me to keep fixed the size for each single CNV. Thank you very much for your help! Cristina

genome cnv R simulations gene • 101 views
ADD COMMENTlink modified 10 weeks ago by bernatgel1.3k • written 10 weeks ago by Crisr0
0
gravatar for bernatgel
10 weeks ago by
bernatgel1.3k
Barcelona, Spain
bernatgel1.3k wrote:

Hi Crisr,

You can use the R/Bioconductor package regioneR for that. It has a function called randomizeRegions that will move around your CNV regions maintaing their size and taking care that the randomized regions do not overlap. If you set the per.chromosome parameter to TRUE then it will randomize your regions in their original chromosomes in the way you need them. By default it assumes you are working on human with genome version "hg19" and will get the correct chromosome sizes automatically, but

If you want to create the random regions to perform a permutation test, you can use the permTest function in regioneR tha will take care of the whole process.

Important note: this function will not place any region on "masked" parts of the genome. By default it takes the default mask in the BSGenome package (includes centromeres, repeatmasker....) but in your case you should probably create a mask with only the centromere regions (code to get them below) or disable the mask completely with mask=NA.

How to get the centromeres in 3 lines: You can use karyoploteR to easily get the centromeres with this code. More info on karyoploteR at the tutorial page

library(karyoploteR)
cytobands <- filterChromosomes(getCytobands("hg19"))
centromeres <- cytobands[cytobands$gieStain=="acen"]
ADD COMMENTlink written 10 weeks ago by bernatgel1.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 625 users visited in the last hour