search for: subsetbyoverlaps

Displaying 2 results from an estimated 2 matches for "subsetbyoverlaps".

2016 Apr 05
2
Is that an efficient way to find the overlapped , upstream and downstream ranges for a bunch of ranges
...ene5NA Currently , the strategy I use is like that, library(GenomicRanges) find_overlapped_gene <- function(idx, all_genes_gr) { #cat(idx, "\n") curr_gene <- all_genes_gr[idx] other_genes <- all_genes_gr[-idx] n <- countOverlaps(curr_gene, other_genes) gene <- subsetByOverlaps(curr_gene, other_genes) return(list(n, gene)) }? system.time(lapply(1:100, function(idx) find_overlapped_gene(idx, all_genes_gr))) However, for 100 genes, it use nearly ~8s by system.time().That means if I had 50000 genes, nearly one hour for just find overlapped gene. I am just wondering any...
2016 Apr 05
0
Is that an efficient way to find the overlapped , upstream and downstream rangess for a bunch of rangess
...ne5 NA Currently , the strategy I use is like that, library(GenomicRanges) find_overlapped_gene <- function(idx, all_genes_gr) { #cat(idx, "\n") curr_gene <- all_genes_gr[idx] other_genes <- all_genes_gr[-idx] n <- countOverlaps(curr_gene, other_genes) gene <- subsetByOverlaps(curr_gene, other_genes) return(list(n, gene)) }? system.time(lapply(1:100, function(idx) find_overlapped_gene(idx, all_genes_gr))) However, for 100 genes, it use nearly ~8s by system.time().That means if I had 50000 genes, nearly one hour for just find overlapped gene. I am just wondering any...