Questions tagged [iranges]

IRanges is a Bioconductor package: Infrastructure for manipulating intervals on sequences

The package provides efficient low-level and highly reusable S4 classes for storing ranges of integers, RLE vectors (Run-Length Encoding), and, more generally, data that can be organized sequentially (formally defined as Vector objects), as well as views on these Vector objects. Efficient list-like classes are also provided for storing big collections of instances of the basic classes. All classes in the package use consistent naming and share the same rich and consistent "Vector API" as much as possible.

Author: H. Pagès, P. Aboyoun and M. Lawrence Maintainer: Bioconductor Package Maintainer

Citation (from within R, enter citation("IRanges")):

Lawrence M, Huber W, Pagès H, Aboyoun P, Carlson M, Gentleman R, Morgan M and Carey V (2013). “Software for Computing and Annotating Genomic Ranges.” PLoS Computational Biology, 9.

42 questions
1
vote
1 answer

efficiently combine multiple iranges that span the same range (preserving mcols)

This is a followup of a question I asked yesterday, now extended to include more than 2 inputs. I was able to find two related answers on SO, but none of them gave quite enough information for me to solve this in a performant way. I would like to…
rcorty
  • 1,140
  • 1
  • 10
  • 28
1
vote
1 answer

Plot overlaps of time intervals

I have the following df Id a_min_date a_max_date b_min_date b_max_date c_min_date c_max_date d_min_date a_max_date 1 2014-01-01 2014-01-10 2014-01-05 2014-01-15 NA …
A1976
  • 39
  • 6
1
vote
1 answer

Ordering list object of IRanges to get all elements decreasing

I am having difficulties trying to order a list element-wise by decreasing order... I have a ByPos_Mindex object or a list of 1000 IRange objects (CG_seqP) from C <- vmatchPattern(CG, CPGi_Seq, max.mismatch = 0, with.indels = FALSE) IRanges…
SPLEFFY
  • 33
  • 4
1
vote
1 answer

loop over objects of GRanges list in R

I have problem with looping over the GRanges list. my feature contains a list of objects: feature file: ... $Pol3 GRanges object with 205 ranges and 0 metadata columns: seqnames ranges strand
1
vote
0 answers

How to get genomic coordinates from a fasta file

Since there was update the reference genome, I had to get the fasta from the old sequences (from a bed file) to find the new coordinates in this last release. So, from my fasta file named "my.fasta", (with 35 sequences) I created a "DNAStringSet"…
Fpertille
  • 383
  • 1
  • 14
1
vote
1 answer

Any way to extract out named IntegerList more elegantly from nested list?

I have list of position index in the IntegerList, and I intended to filter them given threshold, and it works well. However, I want to extract out one of specific filtered set for each IntegerList for further usage. I aware that myList is nested…
Andy.Jian
  • 417
  • 3
  • 15
1
vote
0 answers

How to count overlaps between multiple categories in R

I have a data frame of start time, end time in UNIX time stamp and category, as below: I want to find the overlaps of one category say "a" among other categories "b" & "c" and same for other categories. I want to find how many number of…
user6559913
  • 483
  • 4
  • 7
  • 15
1
vote
1 answer

Venn Diagram from GRanges

I have granges objects like these( showing two of the four): > upmd_Hf3a GRanges object with 398117 ranges and 2 metadata columns: seqnames ranges strand | type nCG
1
vote
2 answers

R combine output of findOverlaps and countOverlaps

I have two sets of IRanges to compare. My goal is to get an output that has the position of overlaps if one exists and the offset of the ranges listed as a negative start if they do not overlap. At the very least if I can't get the offset I would…
user2909302
  • 103
  • 8
1
vote
1 answer

printing a list based on range met

I would like to generate an string output into a list if some values are met. I have a table that looks like this: grp V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 V14 V15 V16 V17 1: 1 go.1 142 144 132 134 0 31 11 F D T hy …
user3141121
  • 480
  • 3
  • 8
  • 17
1
vote
1 answer

apply function to return a data.table, or convert the list directly to a data.table

I would like to apply a function that returns a matrix to each row of a large data.table object (original file is around 30 GB, I have 80 GB ram), and get back a data.table object. I'd like to do it efficiently. My current approach is the…
Dnaiel
  • 7,622
  • 23
  • 67
  • 126
0
votes
0 answers

Function accepts format myFunc(x = c(obj[[1]], obj[[2]], obj[[3]])), but doesn't accept myFunc(x = obj) or myFunc(x = unlist(obj))

I am trying to combine several grange objects in R using the reduce() function. I already have the grange objects stored in a list, but I can't figure out how to pass the list onto the reduce function. I have tried reduce(x = granges)) reduce(x =…
rdv
  • 41
  • 4
0
votes
0 answers

Find overlaps within a GRanges object

I want to use a txdb annotation database to find out the genes that have no overlap with others. So I first get all genes locus: library(GenomicFeatures) txdb <- loadDb("gencode.v40.annotation.sqlite") gene <- genes(txdb) gene ## GRanges object with…
0
votes
0 answers

why makeGRangesFromDataFrame don't do the IRange

I have a dataframe with 4 columns: chromosome start end score and for each columns I have multiple rows, like this: > neuron_df seqnames start end score 1 chrI 1540683 1540683 6.33554 2 chrI 1838049 1838049 …
0
votes
0 answers

How to convert factor Rle to order perserved string list? R

Ok so I have an object and I recovered a factor-RLE that looks sort of like this: x <- rle(c(1,1,1,2,2,3,4,4,4)) and I would want to do something to x such that this returned: 1 1 1 2 2 3 4 4 4 My example is a little more complex as my object…
Sky Scraper
  • 148
  • 1
  • 10