Intersecting two chromosomal ranges but keeping the unique ones
1
0
Entering edit mode
@steve-lianoglou-2771
Last seen 14 months ago
United States
Hi, As an aside, don't forget to hit "reply all" when responding to bioc emails, so our correspondence stays on the list. Now: On Mon, Mar 12, 2012 at 12:12 PM, Yadav Sapkota <ysapkota at="" ualberta.ca=""> wrote: > Hi Steve, > > Thank you very much for the prompt reply. > > I tried countOverlaps, match and %in% functions and they all work but the > output is in logical format. I was wondering if I could just append the > results of any of these three functions with the output given by INTERSECT > function as Rangelist (same as query or subject format) Well, you can just use the result of these functions to index your ranges in order to keep the ones that are TRUE, eg: R> subject.only <- subject[countOverlaps(subject, Query) == 0] R> temp <- c(intersected, subject.only) ... and ... I guess you can take it from here? -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
Cancer Cancer • 690 views
ADD COMMENT
0
Entering edit mode
Yadav Sapkota ▴ 130
@yadav-sapkota-5156
Last seen 9.7 years ago
Many thanks Steve...that works now... Regards, Yadav On Mon, Mar 12, 2012 at 12:31 PM, Steve Lianoglou < mailinglist.honeypot@gmail.com> wrote: > Hi, > > As an aside, don't forget to hit "reply all" when responding to bioc > emails, so our correspondence stays on the list. > > Now: > > On Mon, Mar 12, 2012 at 12:12 PM, Yadav Sapkota <ysapkota@ualberta.ca> > wrote: > > Hi Steve, > > > > Thank you very much for the prompt reply. > > > > I tried countOverlaps, match and %in% functions and they all work but the > > output is in logical format. I was wondering if I could just append the > > results of any of these three functions with the output given by > INTERSECT > > function as Rangelist (same as query or subject format) > > Well, you can just use the result of these functions to index your > ranges in order to keep the ones that are TRUE, eg: > > R> subject.only <- subject[countOverlaps(subject, Query) == 0] > R> temp <- c(intersected, subject.only) > > ... and ... I guess you can take it from here? > > -steve > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact > > -- Yadav Sapkota PhD Candidate Dept. of Laboratory Medicine and Pathology, UofA Cross Cancer Institute 11560 University Avenue, Edmonton AB T6G 1Z2 Phone: 780-5778092 [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 872 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6