Question: Bx-Python Question About Bed_Intersect_Basewise.Py
gravatar for Amit Indap
8.0 years ago by
Amit Indap60
Amit Indap60 wrote:
Sorry, Galaxy I hit sent by accident in my earlier message. Like I said, I had a question about My first bed file has the following interval: chr22 267 572 and my second bed file has the intervals: chr22 147 267 chr22 267 387 chr22 387 507 chr22 507 627 When I run the program, I get the answer chr22 202 572 But I'm trying to see if there is a way I can get the complement, bases in the second file that don't overlap the first. The desired answer would be: chr22 147 267 chr22 572 627 I know there is a -v option on, but I want the equivalent basewise behavior. I was trying to poke around the BinnedBitSet code, and I see there is an invert method, but calling the invert method has some side effects on the rest of the code (either the next_set or next_clear call), and I get a run-time error. The BinnedBitSet code somewhat of a blackbox to me, but I'd appreciate any pointers in the right direction. Thanks for your help, Amit Indap -- Amit Indap
galaxy • 701 views
ADD COMMENTlink modified 8.0 years ago by James Taylor470 • written 8.0 years ago by Amit Indap60
gravatar for James Taylor
8.0 years ago by
James Taylor470
United States
James Taylor470 wrote:
Excerpts from Amit Indap's message of Tue Dec 07 04:10:09 +0000 2010: is the key here. There are multiple ways to get the desired result, but here is one: 1.bed <(echo "chr22 1000") | /dev/stdin 2.bed needs a LEN file, here I just make a fake one on the fly, you will probably want to use a real one, although for this particular case, it doesn't matter as long as the lengths are larger than any end position in the second file. (In Galaxy, this is 'complement' followed by 'intersect' with overlapping pieces, LEN files are handled automagically). -- James Taylor, Assistant Professor, Biology / Computer Science, Emory University
ADD COMMENTlink written 8.0 years ago by James Taylor470
Please log in to add an answer.


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