Questions tagged [pyranges]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Compare in Python / PyRanges two genomic intervals to determine whether they're separate, partially overlapping, or contained

As part of a larger analysis, I need to evaluate pairs of genomic regions (regionsA and regionsB) and perform different ...
Einar's user avatar
  • 131
2 votes
1 answer
52 views

Assign score to PyRanges from another PyRanges object

I have two PyRanges objects. PR1 is a set of regions of interest across a chromosome, PR2 tiles the genome and has a score associated with each range. I need a way to get for each range in PR1 its ...
Whitehot's user avatar
  • 300
1 vote
1 answer
64 views

How to adjust #columns shown when PyRange is printed?

In Pandas, we have pandas.options.display to adjust how a DataFrame should be displayed when printed. I wonder if PyRanges has a ...
Amin.A's user avatar
  • 25
1 vote
1 answer
31 views

How to add N bases to PyRange object (i.e., shifting PyRanges coordinates)

I would like to add n (e.g., 1k) bases to a PyRange object (i.e., shifting PyRanges coordinates). How can I do that? Input: ...
Amin.A's user avatar
  • 25
3 votes
3 answers
848 views

Subset GTF file for specific genes

I have a GTF file (in 'test.gtf' file): ...
justinian482's user avatar
3 votes
2 answers
235 views

Create new range based from existing range (python)

I have a pyranges object that I am looking to iterate over. For each range, I would like to "resize" it to its centre (so start+end/2) and save that into ...
Whitehot's user avatar
  • 300
2 votes
2 answers
532 views

Efficiently iterate over bed and subset pyranges objects

I am using pyranges and I have two datasets that I want to compare in several genome-wide intervals based on a bed file. For every interval in the bed file, I want to get all overlapping positions ...
Wouter De Coster's user avatar
0 votes
1 answer
89 views

Summing two columns where they share interval overlap

I have two bed files where each column has a numeric score. I want to sum these numbers where there is overlap between the two bed files. How do I do that? Also, I am only interested in the score in ...
The Unfun Cat's user avatar