Question: unique, duplicated, order, etc... on a GRanges object
0
gravatar for Hervé Pagès
7.6 years ago by
Hervé Pagès ♦♦ 13k
United States
Hervé Pagès ♦♦ 13k wrote:
Hi there, Seems like there was some need for this. So I added the standard set of methods for ordering and comparing genomic ranges i.e. duplicated, unique, order, sort, rank, "==", "!=", "<=", ">=", "<", ">" now all work with GRanges objects. It's in GenomicRanges 1.4.8 (release) and 1.5.27 (devel). With Steve's big GRanges object: > system.time(oo <- order(xgr)) user system elapsed 18.600 0.370 19.007 'xgr' obtained with: N <- 20000000L # nb of ranges W <- 40L # average width of the ranges start <- 1L end <- 55000000L set.seed(777) x_start <- sample(end - W - 2L, N, replace=TRUE) x_width <- W + sample(-3:3, N, replace=TRUE) x <- IRanges(start=x_start, width=x_width) xgr <- GRanges(sample(c('chr1', 'chr2'), length(x), replace=TRUE), x, sample(c('+', '-'), length(x), replace=TRUE)) You can have a look at ?`GenomicRanges-comparison` for more examples. Let me know if you find any issue with this. Cheers, H. -- Hervé Pagès Program in Computational Biology Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 P.O. Box 19024 Seattle, WA 98109-1024 E-mail: hpages at fhcrc.org Phone: (206) 667-5791 Fax: (206) 667-1319
cancer genomicranges • 1.8k views
ADD COMMENTlink written 7.6 years ago by Hervé Pagès ♦♦ 13k
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 16.09
Traffic: 325 users visited in the last hour