Questions tagged [pybedtools]

pybedtools wraps and extends BEDTools and offers feature-level manipulations from within Python.

Filter by
Sorted by
Tagged with
1
vote
1answer
35 views

How to detect bedtools version used by pybedtools (in order to correctly preserve strand information when merging gtf records)

I have issues working with pybedtools due to strand information being lost after extracting and merging transcript coordinates from a gtf file. It seems that the solution to preserve strand ...
7
votes
4answers
1k views
2
votes
1answer
860 views

How to split bedfile into non-overlapping regions and compute aggregation function on duplicate segments

I have a bed-like file in which I have several overlapping regions with associated features. I want to split the overlapping regions into disjoint regions in order to process the file (e.g. with ...
0
votes
1answer
53 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 ...
1
vote
1answer
120 views

How to efficiently extract coordinates from a `pybedtools.Interval`?

I'm using pybedtools to process data, and at some point, I loop over a BedTool object and use unpacking to extract coordinates from the ...
4
votes
1answer
74 views

How to use variables while calling pybedtools

I am trying to use bedtools and fetch sequences from a whole genome fasta file inside the script I get region coordinates as variables. For example: ...