Questions tagged [genomicranges]
72 questions
1
vote
1 answer
Can convert Granges to data.frame
I have follow data:
# you can input data by run following script in Rstudio R_gui or R
# this is a dput output
# so you can run it for import data
library(GenomicRanges)
gr_test <- new("GRanges", seqnames = new("Rle", values = structure(1L,
…

zhang
- 185
- 7
1
vote
0 answers
Combine GRangesList with unified breakpoints
I'm looking to merge a list of 6 GRanges objects into one, with the resulting table have a common set of breakpoints across all 6 objects as shown in Figure 1 below. I've tried to do this using findOverlaps(), however the this is equivalent to a…

RodrigoGM
- 68
- 5
1
vote
1 answer
How to get findOverlapped region?
Hi i am working with GRanges and finding the overlaps using findOverlaps function of IRanges. I am getting the hits of which query and subject are overlapped,but I want to also have the coordinates of query and subject where they are overlapped…

user15708301
- 63
- 6
1
vote
0 answers
R: For loop to subset Granges objects by list
I have a txf_df which I subset by gene.list$entrez and then found the list of unique number of transcripts. The txf_df is then converted to txf_grange.
Now, I want to create a for loop of the 15 unique genes, where upon each iteration, subset the…

melolili
- 1,237
- 6
- 16
1
vote
2 answers
How to remove overlapping sequences from two datatables?
I have two data.tables that provide sequence coordinates across different chromosomes (categories). For example:
library(data.table)
dt1 <- data.table(chromosome = c("1", "1", "1", "1", "X"),
start = c(1, 50, 110, 150, 110),
…

Powege
- 685
- 5
- 12
1
vote
2 answers
Overlapping and sorting counts from small, equally sized, continuous bins into irregular, uneven bins
I really appreciate if you are reading this and taking your precious time to help me with a problem I have.
In R, I would like to sort data from small, continuous bins from one dataframe to the (non-overlapping) bins of irregular size and…
1
vote
1 answer
Finding overlaps between 2 ranges and their overlapped region lengths?
I need to find length of overlapped region on same chromosomes between 2 group(gp1 & gp2). (similar question in stackoverflow were different from my aim, because I wanna find overlapped region not a TRUE/FALSE answer).
For example:
gp1:
chr start…

hiam
- 13
- 2
1
vote
1 answer
Error in as.vector(x) : no method for coercing this S4 class to a vector
I am trying to run an R script on the command line of bash (I am using CentOS 8) with the command:
cat 1_myScript.R | R --slave --args $SAMPLE"_x" $SAMPLE"_y"
where $SAMPLE is an argument that I have specified in the R script as follows
>…

Giuseppe D'alterio
- 200
- 3
- 9
1
vote
1 answer
A fast way tp spread a linear range
I have a data.frame where each row is a linear interval - specifically these intervals are start and end coordinates on chromosomes (chr below):
df <- data.frame(chr = c("chr1","chr2","chr2","chr3"),
strand = c("+","+","-","-"),
…

dan
- 6,048
- 10
- 57
- 125
1
vote
2 answers
Compare two genomic ranges (R)
I have 2 genomic ranges
g1<-GRanges(c("chr1:0-14","chr1:15-29"), score=c(20.2,10.4));g1
GRanges object with 2 ranges and 1 metadata column:
seqnames ranges strand | score
|
[1] chr1 0-14 …

i love mistaking
- 103
- 7
1
vote
0 answers
Genomic Ranges - Merge Overlaps in Single File (R STUDIO)
I would like to find overlapped regions in the file and merge them keeping the earlier start and the later stop (merge 2 regions in 1)
I meant to use Genomic Ranges but I am not sure how to code the script.
This is what the file fileA.txt…

Kaitsja
- 23
- 3
1
vote
1 answer
Adapt metadata of a GenomicRanges object when disjoined
I have a GRanges object with some genomic intervals and some metadata (3 vectors with the coverage of each region in 3 different samples). I have applied:
disjoin(my_data)
to obtain a new GRanges object with the smallest set of unique,…

Jeni
- 918
- 7
- 19
1
vote
1 answer
Problem with CoverageHeatmap (Bioconductor) function in R
I have 2 sets of pairwise alignments, where query genome 1 (q1) is aligned to the reference genome and query genome 2 (q2) is aligned to the same reference genome. Therefore, I have both alignments with a coordinate system in the reference genome.…

Charlie W
- 99
- 6
1
vote
0 answers
Error with the GenomicFeatures function "transcriptsByOverlaps()" in R
Retrieved the DNA sequence from chromosome1, thanks to the subseq() function and the DNAString function (from biomaRt), my goal is to find all the possible transcripts into this sequence.
I thought to find the overlaps between the GRange object…

LenMar
- 11
- 2
1
vote
1 answer
Find Islands in GenomicRanges
In GenomicRanges one interesting problem is the identification of gene islands.
I am trying to find the largest subset of ranges in which neighboring ranges dont exceed a certain distance. To solve the issue I have tried to assign groups based on…

Peter Pisher
- 457
- 2
- 11