## load data sets
data(hg19Unmasked)
data(b37Unmasked)
## show chromosome names
seqlevels(hg19Unmasked)
seqlevels(b37Unmasked)
## show names of list components
names(hg19Unmasked)
names(b37Unmasked)
## determine numbers of regions for each component
sapply(hg19Unmasked, length)
sapply(b37Unmasked, length)
## re-unite pseudoautosomal regions with their chromosomes
## (that is the result of what unmaskedRegions() would have given
## without specifying pseudoautosomal regions)
hg19basic <- hg19Unmasked[paste0("chr", 1:22)]
hg19basic$chrX <- reduce(unlist(hg19Unmasked[c("chrX", "X.PAR1",
"X.PAR2", "X.XTR")]))
hg19basic$chrY <- reduce(unlist(hg19Unmasked[c("chrY", "Y.PAR1",
"Y.PAR2", "Y.XTR")]))
## show some information about the newly created object
names(hg19basic)
sapply(hg19basic, length)
Run the code above in your browser using DataLab