Questions tagged [pybedtools]

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

Filter by
Sorted by
Tagged with
2 votes
1 answer

converting coordinates to sequences using bedtools getfasta - [segmentation fault] errors

I use bedtools to convert genomic coordinates (in the form of bed files, chrX x1:x2) to genomic sequence content in the form of fasta files ('ACGT...G'). The bedtools format for extracting sequence (....
Zebra Fish's user avatar
1 vote
1 answer

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 ...
bli's user avatar
  • 3,130
0 votes
1 answer

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
8 votes
4 answers

How to do `bedtools intersection` using pandas alone?

I have two pandas Dataframes, using python3.x: ...
EB2127's user avatar
  • 1,413
1 vote
1 answer

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 ...
bli's user avatar
  • 3,130
4 votes
1 answer

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: ...
lizaveta's user avatar
  • 203
2 votes
1 answer

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 ...
gc5's user avatar
  • 1,783