Question: overlap BED files, but account for region name
0
gravatar for igor
18 months ago by
igor7.1k
United States
igor7.1k wrote:

I recently found ReMap which is a great resource of TF binding sites across different studies. They provide the binding sites in BED format where each region is named based on the TF. Although it's relatively trivial to overlap two BED files (using something like bedtools fisher or bedtools intersect), that assumes that you're just overlapping two sets of regions. Is there a way to generate the results separated by region name? I could split by TF and process each one separately in a giant loop, but that seems inefficient.

bedtools bed overlap • 643 views
ADD COMMENTlink modified 6 weeks ago by Biostar ♦♦ 20 • written 18 months ago by igor7.1k
1
gravatar for Chris Miller
18 months ago by
Chris Miller20k
Washington University in St. Louis, MO
Chris Miller20k wrote:

Your proposal of splitting into separate files by name seems reasonable to me. If that's not satisfying, nothing is stopping you from writing a 20-line perl script that does the intersection in a name-aware manner. Genome set operations aren't hard, it's just more convenient to use existing tools.

ADD COMMENTlink written 18 months ago by Chris Miller20k

Thanks for confirming. I just wanted to make sure I am not reinventing the wheel or missing something.

ADD REPLYlink written 18 months ago by igor7.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1678 users visited in the last hour