distanceToNearest for GRanges?
2
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States
This has been added to GenomicRanges 1.9.4. You will also need IRanges 1.15.2. Valerie On 03/27/2012 10:36 AM, Janet Young wrote: > Hi, > > thank you both - very helpful. > > Janet > > > > On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: > >> Hi Janet, Malcom, >> >> Yes, we can add distanceToNearest for GRanges. This will probably happen after the release (i.e., next week). I'll post back here when it's complete. >> >> Valerie >> >> >> On 03/26/12 16:26, Cook, Malcolm wrote: >>> Janet, >>> >>> In the mean time.... >>> >>> distanceToNearest.GRanges<- function (query,subject=query,...,.AS=DataFrame) { >>> ## PURPOSE: an implementation of distanceToNearest for GRanges in >>> ## terms of 'nearest' and 'distance' whose return value is shaped >>> ## like that of IRange's 'nearest', by default, but you can ask for >>> ## the result .AS=data.table or .AS=data.frame if you prefer. >>> if(missing(subject)) { >>> nearestSubjectIndex<-nearest(query,...) >>> } else { >>> nearestSubjectIndex<-nearest(query,subject,...) >>> } >>> queryHasNearest<-! is.na(nearestSubjectIndex) >>> queryIndex<-which(queryHasNearest) >>> queryHavingNearest<-query[queryIndex] >>> nearestSubjectIndex<-nearestSubjectIndex[queryIndex] >>> nearestSubject<-subject[nearestSubjectIndex] >>> d<-distance(queryHavingNearest,nearestSubject) >>> .AS(query=queryIndex >>> ,subject=nearestSubjectIndex >>> ,distance=d) >>> } >>> >>> You've asked so many questions in this forum whose answer I made use of that I must owe you this tidbit.... >>> >>> Lurkers, and fellow travelers, I welcome corrections and stylistic suggestions. >>> >>> Cheers, >>> >>> Malcolm Cook >>> >>> >>> ________________________________________ >>> From: bioconductor-bounces at r-project.org [bioconductor-bounces at r-project.org] On Behalf Of Janet Young [jayoung at fhcrc.org] >>> Sent: Monday, March 26, 2012 4:42 PM >>> To: bioconductor at r-project.org >>> Subject: [BioC] distanceToNearest for GRanges? >>> >>> Hi there, >>> >>> Any plans to implement distanceToNearest for GRanges objects? That would be really useful for me. >>> >>> thanks, >>> >>> Janet >>> >>> >>> ------------------------------------------------------------------- >>> >>> Dr. Janet Young >>> >>> Tapscott and Malik labs >>> >>> Fred Hutchinson Cancer Research Center >>> 1100 Fairview Avenue N., C3-168, >>> P.O. Box 19024, Seattle, WA 98109-1024, USA. >>> >>> tel: (206) 667 1471 fax: (206) 667 6524 >>> email: jayoung ...at... fhcrc.org >>> >>> >>> ------------------------------------------------------------------- >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
Cancer GenomicRanges Cancer GenomicRanges • 1.4k views
ADD COMMENT
0
Entering edit mode
Malcolm Cook ★ 1.6k
@malcolm-cook-6293
Last seen 3 months ago
United States
thanks Valerie, Did you happen to vet the logic of my implementation, or did you just code it lower level from first principals? Cheers, ~Malcolm > -----Original Message----- > From: Valerie Obenchain [mailto:vobencha at fhcrc.org] > Sent: Wednesday, April 11, 2012 11:13 AM > To: Janet Young > Cc: Cook, Malcolm; bioconductor at r-project.org > Subject: Re: [BioC] distanceToNearest for GRanges? > > This has been added to GenomicRanges 1.9.4. You will also need IRanges > 1.15.2. > > Valerie > > > On 03/27/2012 10:36 AM, Janet Young wrote: > > Hi, > > > > thank you both - very helpful. > > > > Janet > > > > > > > > On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: > > > >> Hi Janet, Malcom, > >> > >> Yes, we can add distanceToNearest for GRanges. This will probably > happen after the release (i.e., next week). I'll post back here when it's > complete. > >> > >> Valerie > >> > >> > >> On 03/26/12 16:26, Cook, Malcolm wrote: > >>> Janet, > >>> > >>> In the mean time.... > >>> > >>> distanceToNearest.GRanges<- function > (query,subject=query,...,.AS=DataFrame) { > >>> ## PURPOSE: an implementation of distanceToNearest for GRanges in > >>> ## terms of 'nearest' and 'distance' whose return value is shaped > >>> ## like that of IRange's 'nearest', by default, but you can ask for > >>> ## the result .AS=data.table or .AS=data.frame if you prefer. > >>> if(missing(subject)) { > >>> nearestSubjectIndex<-nearest(query,...) > >>> } else { > >>> nearestSubjectIndex<-nearest(query,subject,...) > >>> } > >>> queryHasNearest<-! is.na(nearestSubjectIndex) > >>> queryIndex<-which(queryHasNearest) > >>> queryHavingNearest<-query[queryIndex] > >>> nearestSubjectIndex<-nearestSubjectIndex[queryIndex] > >>> nearestSubject<-subject[nearestSubjectIndex] > >>> d<-distance(queryHavingNearest,nearestSubject) > >>> .AS(query=queryIndex > >>> ,subject=nearestSubjectIndex > >>> ,distance=d) > >>> } > >>> > >>> You've asked so many questions in this forum whose answer I made use > of that I must owe you this tidbit.... > >>> > >>> Lurkers, and fellow travelers, I welcome corrections and stylistic > suggestions. > >>> > >>> Cheers, > >>> > >>> Malcolm Cook > >>> > >>> > >>> ________________________________________ > >>> From: bioconductor-bounces at r-project.org [bioconductor- bounces at r- > project.org] On Behalf Of Janet Young [jayoung at fhcrc.org] > >>> Sent: Monday, March 26, 2012 4:42 PM > >>> To: bioconductor at r-project.org > >>> Subject: [BioC] distanceToNearest for GRanges? > >>> > >>> Hi there, > >>> > >>> Any plans to implement distanceToNearest for GRanges objects? That > would be really useful for me. > >>> > >>> thanks, > >>> > >>> Janet > >>> > >>> > >>> ------------------------------------------------------------------- > >>> > >>> Dr. Janet Young > >>> > >>> Tapscott and Malik labs > >>> > >>> Fred Hutchinson Cancer Research Center > >>> 1100 Fairview Avenue N., C3-168, > >>> P.O. Box 19024, Seattle, WA 98109-1024, USA. > >>> > >>> tel: (206) 667 1471 fax: (206) 667 6524 > >>> email: jayoung ...at... fhcrc.org > >>> > >>> > >>> ------------------------------------------------------------------- > >>> > >>> _______________________________________________ > >>> Bioconductor mailing list > >>> Bioconductor at r-project.org > >>> https://stat.ethz.ch/mailman/listinfo/bioconductor > >>> Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > >>> _______________________________________________ > >>> Bioconductor mailing list > >>> Bioconductor at r-project.org > >>> https://stat.ethz.ch/mailman/listinfo/bioconductor > >>> Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Hi Malcom, For distanceToNearest() I started with the ranges method in IRanges. Along the way I did find that distance,GenomicRanges,GenomicRanges was not handling the situation of '*','-' and '*','+' strand pairs (simply returning NA). Now those strand combinations are considered compatible just as '-','-' and '+','+' are. Let me know if you run into problems with the method or have other suggestions. Take care, Valerie On 04/11/2012 09:46 AM, Cook, Malcolm wrote: > thanks Valerie, > > Did you happen to vet the logic of my implementation, or did you just code it lower level from first principals? > > Cheers, > > ~Malcolm > >> -----Original Message----- >> From: Valerie Obenchain [mailto:vobencha at fhcrc.org] >> Sent: Wednesday, April 11, 2012 11:13 AM >> To: Janet Young >> Cc: Cook, Malcolm; bioconductor at r-project.org >> Subject: Re: [BioC] distanceToNearest for GRanges? >> >> This has been added to GenomicRanges 1.9.4. You will also need IRanges >> 1.15.2. >> >> Valerie >> >> >> On 03/27/2012 10:36 AM, Janet Young wrote: >>> Hi, >>> >>> thank you both - very helpful. >>> >>> Janet >>> >>> >>> >>> On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: >>> >>>> Hi Janet, Malcom, >>>> >>>> Yes, we can add distanceToNearest for GRanges. This will probably >> happen after the release (i.e., next week). I'll post back here when it's >> complete. >>>> Valerie >>>> >>>> >>>> On 03/26/12 16:26, Cook, Malcolm wrote: >>>>> Janet, >>>>> >>>>> In the mean time.... >>>>> >>>>> distanceToNearest.GRanges<- function >> (query,subject=query,...,.AS=DataFrame) { >>>>> ## PURPOSE: an implementation of distanceToNearest for GRanges in >>>>> ## terms of 'nearest' and 'distance' whose return value is shaped >>>>> ## like that of IRange's 'nearest', by default, but you can ask for >>>>> ## the result .AS=data.table or .AS=data.frame if you prefer. >>>>> if(missing(subject)) { >>>>> nearestSubjectIndex<-nearest(query,...) >>>>> } else { >>>>> nearestSubjectIndex<-nearest(query,subject,...) >>>>> } >>>>> queryHasNearest<-! is.na(nearestSubjectIndex) >>>>> queryIndex<-which(queryHasNearest) >>>>> queryHavingNearest<-query[queryIndex] >>>>> nearestSubjectIndex<-nearestSubjectIndex[queryIndex] >>>>> nearestSubject<-subject[nearestSubjectIndex] >>>>> d<-distance(queryHavingNearest,nearestSubject) >>>>> .AS(query=queryIndex >>>>> ,subject=nearestSubjectIndex >>>>> ,distance=d) >>>>> } >>>>> >>>>> You've asked so many questions in this forum whose answer I made use >> of that I must owe you this tidbit.... >>>>> Lurkers, and fellow travelers, I welcome corrections and stylistic >> suggestions. >>>>> Cheers, >>>>> >>>>> Malcolm Cook >>>>> >>>>> >>>>> ________________________________________ >>>>> From: bioconductor-bounces at r-project.org [bioconductor- bounces at r- >> project.org] On Behalf Of Janet Young [jayoung at fhcrc.org] >>>>> Sent: Monday, March 26, 2012 4:42 PM >>>>> To: bioconductor at r-project.org >>>>> Subject: [BioC] distanceToNearest for GRanges? >>>>> >>>>> Hi there, >>>>> >>>>> Any plans to implement distanceToNearest for GRanges objects? That >> would be really useful for me. >>>>> thanks, >>>>> >>>>> Janet >>>>> >>>>> >>>>> ------------------------------------------------------------------- >>>>> >>>>> Dr. Janet Young >>>>> >>>>> Tapscott and Malik labs >>>>> >>>>> Fred Hutchinson Cancer Research Center >>>>> 1100 Fairview Avenue N., C3-168, >>>>> P.O. Box 19024, Seattle, WA 98109-1024, USA. >>>>> >>>>> tel: (206) 667 1471 fax: (206) 667 6524 >>>>> email: jayoung ...at... fhcrc.org >>>>> >>>>> >>>>> ------------------------------------------------------------------- >>>>> >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at r-project.org >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at r-project.org >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Hi Valerie (and others), while installing the new GenomicRanges from SVN, I get this error: GenomicRanges.so: undefined symbol: IntAE_set_nelt I installed the newest version of IRanges, where this error appears to be coming from. Is this a common problem? If so, what's the fix? It has happened before, I'm not sure whether the reason is instability in SVN or something with my install. Thanks, --t On Wed, Apr 11, 2012 at 11:44 AM, Valerie Obenchain <vobencha@fhcrc.org>wrote: > Hi Malcom, > > For distanceToNearest() I started with the ranges method in IRanges. Along > the way I did find that distance,GenomicRanges,**GenomicRanges was not > handling the situation of '*','-' and '*','+' strand pairs (simply > returning NA). Now those strand combinations are considered compatible just > as '-','-' and '+','+' are. > > Let me know if you run into problems with the method or have other > suggestions. > > Take care, > Valerie > > > On 04/11/2012 09:46 AM, Cook, Malcolm wrote: > >> thanks Valerie, >> >> Did you happen to vet the logic of my implementation, or did you just >> code it lower level from first principals? >> >> Cheers, >> >> ~Malcolm >> >> -----Original Message----- >>> From: Valerie Obenchain [mailto:vobencha@fhcrc.org] >>> Sent: Wednesday, April 11, 2012 11:13 AM >>> To: Janet Young >>> Cc: Cook, Malcolm; bioconductor@r-project.org >>> Subject: Re: [BioC] distanceToNearest for GRanges? >>> >>> This has been added to GenomicRanges 1.9.4. You will also need IRanges >>> 1.15.2. >>> >>> Valerie >>> >>> >>> On 03/27/2012 10:36 AM, Janet Young wrote: >>> >>>> Hi, >>>> >>>> thank you both - very helpful. >>>> >>>> Janet >>>> >>>> >>>> >>>> On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: >>>> >>>> Hi Janet, Malcom, >>>>> >>>>> Yes, we can add distanceToNearest for GRanges. This will probably >>>>> >>>> happen after the release (i.e., next week). I'll post back here when >>> it's >>> complete. >>> >>>> Valerie >>>>> >>>>> >>>>> On 03/26/12 16:26, Cook, Malcolm wrote: >>>>> >>>>>> Janet, >>>>>> >>>>>> In the mean time.... >>>>>> >>>>>> distanceToNearest.GRanges<- function >>>>>> >>>>> (query,subject=query,...,.AS=**DataFrame) { >>> >>>> ## PURPOSE: an implementation of distanceToNearest for GRanges in >>>>>> ## terms of 'nearest' and 'distance' whose return value is shaped >>>>>> ## like that of IRange's 'nearest', by default, but you can ask for >>>>>> ## the result .AS=data.table or .AS=data.frame if you prefer. >>>>>> if(missing(subject)) { >>>>>> nearestSubjectIndex<-nearest(**query,...) >>>>>> } else { >>>>>> nearestSubjectIndex<-nearest(**query,subject,...) >>>>>> } >>>>>> queryHasNearest<-! is.na(nearestSubjectIndex) >>>>>> queryIndex<-which(**queryHasNearest) >>>>>> queryHavingNearest<-query[**queryIndex] >>>>>> nearestSubjectIndex<-**nearestSubjectIndex[**queryIndex] >>>>>> nearestSubject<-subject[**nearestSubjectIndex] >>>>>> d<-distance(**queryHavingNearest,**nearestSubject) >>>>>> .AS(query=queryIndex >>>>>> ,subject=nearestSubjectIndex >>>>>> ,distance=d) >>>>>> } >>>>>> >>>>>> You've asked so many questions in this forum whose answer I made use >>>>>> >>>>> of that I must owe you this tidbit.... >>> >>>> Lurkers, and fellow travelers, I welcome corrections and stylistic >>>>>> >>>>> suggestions. >>> >>>> Cheers, >>>>>> >>>>>> Malcolm Cook >>>>>> >>>>>> >>>>>> ______________________________**__________ >>>>>> From: bioconductor-bounces@r-**project.org<bioconductor- bounces@r-project.org="">[bioconductor-bounces@r- >>>>>> >>>>> project.org] On Behalf Of Janet Young [jayoung@fhcrc.org] >>> >>>> Sent: Monday, March 26, 2012 4:42 PM >>>>>> To: bioconductor@r-project.org >>>>>> Subject: [BioC] distanceToNearest for GRanges? >>>>>> >>>>>> Hi there, >>>>>> >>>>>> Any plans to implement distanceToNearest for GRanges objects? That >>>>>> >>>>> would be really useful for me. >>> >>>> thanks, >>>>>> >>>>>> Janet >>>>>> >>>>>> >>>>>> ------------------------------**------------------------------** >>>>>> ------- >>>>>> >>>>>> Dr. Janet Young >>>>>> >>>>>> Tapscott and Malik labs >>>>>> >>>>>> Fred Hutchinson Cancer Research Center >>>>>> 1100 Fairview Avenue N., C3-168, >>>>>> P.O. Box 19024, Seattle, WA 98109-1024, USA. >>>>>> >>>>>> tel: (206) 667 1471 fax: (206) 667 6524 >>>>>> email: jayoung ...at... fhcrc.org >>>>>> >>>>>> >>>>>> ------------------------------**------------------------------** >>>>>> ------- >>>>>> >>>>>> ______________________________**_________________ >>>>>> Bioconductor mailing list >>>>>> Bioconductor@r-project.org >>>>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: st="" at.ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>>>> Search the archives: >>>>>> >>>>> http://news.gmane.org/gmane.**science.biology.informatics.**cond uctor<http: news.gmane.org="" gmane.science.biology.informatics.conducto="" r=""> >>> >>>> ______________________________**_________________ >>>>>> Bioconductor mailing list >>>>>> Bioconductor@r-project.org >>>>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: st="" at.ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>>>> Search the archives: >>>>>> >>>>> http://news.gmane.org/gmane.**science.biology.informatics.**cond uctor<http: news.gmane.org="" gmane.science.biology.informatics.conducto="" r=""> >>> >> > ______________________________**_________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.et="" hz.ch="" mailman="" listinfo="" bioconductor=""> > Search the archives: http://news.gmane.org/gmane.** > science.biology.informatics.**conductor<http: news.gmane.org="" gmane.="" science.biology.informatics.conductor=""> > -- *A model is a lie that helps you see the truth.* * * Howard Skipper<http: cancerres.aacrjournals.org="" content="" 31="" 9="" 1173.full.pdf=""> [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Nevermind, I installed from the tarballs on the website from the latest build and it is fine. My bad. I'd still love to figure out why *that* particular error is so common for me. On Wed, Apr 11, 2012 at 11:53 AM, Tim Triche, Jr. <tim.triche@gmail.com>wrote: > Hi Valerie (and others), > > while installing the new GenomicRanges from SVN, I get this error: > > GenomicRanges.so: undefined symbol: IntAE_set_nelt > > I installed the newest version of IRanges, where this error appears to be > coming from. Is this a common problem? If so, what's the fix? > It has happened before, I'm not sure whether the reason is instability in > SVN or something with my install. > > Thanks, > > --t > > > On Wed, Apr 11, 2012 at 11:44 AM, Valerie Obenchain <vobencha@fhcrc.org>wrote: > >> Hi Malcom, >> >> For distanceToNearest() I started with the ranges method in IRanges. >> Along the way I did find that distance,GenomicRanges,**GenomicRanges was >> not handling the situation of '*','-' and '*','+' strand pairs (simply >> returning NA). Now those strand combinations are considered compatible just >> as '-','-' and '+','+' are. >> >> Let me know if you run into problems with the method or have other >> suggestions. >> >> Take care, >> Valerie >> >> >> On 04/11/2012 09:46 AM, Cook, Malcolm wrote: >> >>> thanks Valerie, >>> >>> Did you happen to vet the logic of my implementation, or did you just >>> code it lower level from first principals? >>> >>> Cheers, >>> >>> ~Malcolm >>> >>> -----Original Message----- >>>> From: Valerie Obenchain [mailto:vobencha@fhcrc.org] >>>> Sent: Wednesday, April 11, 2012 11:13 AM >>>> To: Janet Young >>>> Cc: Cook, Malcolm; bioconductor@r-project.org >>>> Subject: Re: [BioC] distanceToNearest for GRanges? >>>> >>>> This has been added to GenomicRanges 1.9.4. You will also need IRanges >>>> 1.15.2. >>>> >>>> Valerie >>>> >>>> >>>> On 03/27/2012 10:36 AM, Janet Young wrote: >>>> >>>>> Hi, >>>>> >>>>> thank you both - very helpful. >>>>> >>>>> Janet >>>>> >>>>> >>>>> >>>>> On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: >>>>> >>>>> Hi Janet, Malcom, >>>>>> >>>>>> Yes, we can add distanceToNearest for GRanges. This will probably >>>>>> >>>>> happen after the release (i.e., next week). I'll post back here when >>>> it's >>>> complete. >>>> >>>>> Valerie >>>>>> >>>>>> >>>>>> On 03/26/12 16:26, Cook, Malcolm wrote: >>>>>> >>>>>>> Janet, >>>>>>> >>>>>>> In the mean time.... >>>>>>> >>>>>>> distanceToNearest.GRanges<- function >>>>>>> >>>>>> (query,subject=query,...,.AS=**DataFrame) { >>>> >>>>> ## PURPOSE: an implementation of distanceToNearest for GRanges in >>>>>>> ## terms of 'nearest' and 'distance' whose return value is shaped >>>>>>> ## like that of IRange's 'nearest', by default, but you can ask for >>>>>>> ## the result .AS=data.table or .AS=data.frame if you prefer. >>>>>>> if(missing(subject)) { >>>>>>> nearestSubjectIndex<-nearest(**query,...) >>>>>>> } else { >>>>>>> nearestSubjectIndex<-nearest(**query,subject,...) >>>>>>> } >>>>>>> queryHasNearest<-! is.na(nearestSubjectIndex) >>>>>>> queryIndex<-which(**queryHasNearest) >>>>>>> queryHavingNearest<-query[**queryIndex] >>>>>>> nearestSubjectIndex<-**nearestSubjectIndex[**queryIndex] >>>>>>> nearestSubject<-subject[**nearestSubjectIndex] >>>>>>> d<-distance(**queryHavingNearest,**nearestSubject) >>>>>>> .AS(query=queryIndex >>>>>>> ,subject=nearestSubjectIndex >>>>>>> ,distance=d) >>>>>>> } >>>>>>> >>>>>>> You've asked so many questions in this forum whose answer I made use >>>>>>> >>>>>> of that I must owe you this tidbit.... >>>> >>>>> Lurkers, and fellow travelers, I welcome corrections and stylistic >>>>>>> >>>>>> suggestions. >>>> >>>>> Cheers, >>>>>>> >>>>>>> Malcolm Cook >>>>>>> >>>>>>> >>>>>>> ______________________________**__________ >>>>>>> From: bioconductor-bounces@r-**project.org<bioconductor- bounces@r-project.org="">[bioconductor-bounces@r- >>>>>>> >>>>>> project.org] On Behalf Of Janet Young [jayoung@fhcrc.org] >>>> >>>>> Sent: Monday, March 26, 2012 4:42 PM >>>>>>> To: bioconductor@r-project.org >>>>>>> Subject: [BioC] distanceToNearest for GRanges? >>>>>>> >>>>>>> Hi there, >>>>>>> >>>>>>> Any plans to implement distanceToNearest for GRanges objects? That >>>>>>> >>>>>> would be really useful for me. >>>> >>>>> thanks, >>>>>>> >>>>>>> Janet >>>>>>> >>>>>>> >>>>>>> ------------------------------**------------------------------** >>>>>>> ------- >>>>>>> >>>>>>> Dr. Janet Young >>>>>>> >>>>>>> Tapscott and Malik labs >>>>>>> >>>>>>> Fred Hutchinson Cancer Research Center >>>>>>> 1100 Fairview Avenue N., C3-168, >>>>>>> P.O. Box 19024, Seattle, WA 98109-1024, USA. >>>>>>> >>>>>>> tel: (206) 667 1471 fax: (206) 667 6524 >>>>>>> email: jayoung ...at... fhcrc.org >>>>>>> >>>>>>> >>>>>>> ------------------------------**------------------------------** >>>>>>> ------- >>>>>>> >>>>>>> ______________________________**_________________ >>>>>>> Bioconductor mailing list >>>>>>> Bioconductor@r-project.org >>>>>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: s="" tat.ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>>>>> Search the archives: >>>>>>> >>>>>> http://news.gmane.org/gmane.**science.biology.informatics.**con ductor<http: news.gmane.org="" gmane.science.biology.informatics.conduct="" or=""> >>>> >>>>> ______________________________**_________________ >>>>>>> Bioconductor mailing list >>>>>>> Bioconductor@r-project.org >>>>>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: s="" tat.ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>>>>> Search the archives: >>>>>>> >>>>>> http://news.gmane.org/gmane.**science.biology.informatics.**con ductor<http: news.gmane.org="" gmane.science.biology.informatics.conduct="" or=""> >>>> >>> >> ______________________________**_________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.ch="" mailman="" listinfo="" bioconductor=""> >> Search the archives: http://news.gmane.org/gmane.** >> science.biology.informatics.**conductor<http: news.gmane.org="" gmane="" .science.biology.informatics.conductor=""> >> > > > > -- > *A model is a lie that helps you see the truth.* > * > * > Howard Skipper<http: cancerres.aacrjournals.org="" content="" 31="" 9="" 1173.full.pdf=""> > > -- *A model is a lie that helps you see the truth.* * * Howard Skipper<http: cancerres.aacrjournals.org="" content="" 31="" 9="" 1173.full.pdf=""> [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
@michael-muratet-3076
Last seen 10.2 years ago
On Apr 11, 2012, at 11:12 AM, Valerie Obenchain wrote: > This has been added to GenomicRanges 1.9.4. You will also need > IRanges 1.15.2. Greetings I need this functionality, but I only see GenomicRanges version on the Bioconductor site. I couldn't find it under the Developer links, either. Is it available and where can I get it? Thanks Mike > > Valerie > > > On 03/27/2012 10:36 AM, Janet Young wrote: >> Hi, >> >> thank you both - very helpful. >> >> Janet >> >> >> >> On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: >> >>> Hi Janet, Malcom, >>> >>> Yes, we can add distanceToNearest for GRanges. This will probably >>> happen after the release (i.e., next week). I'll post back here >>> when it's complete. >>> >>> Valerie >>> >>> >>> On 03/26/12 16:26, Cook, Malcolm wrote: >>>> Janet, >>>> >>>> In the mean time.... >>>> >>>> distanceToNearest.GRanges<- function >>>> (query,subject=query,...,.AS=DataFrame) { >>>> ## PURPOSE: an implementation of distanceToNearest for GRanges in >>>> ## terms of 'nearest' and 'distance' whose return value is shaped >>>> ## like that of IRange's 'nearest', by default, but you can ask >>>> for >>>> ## the result .AS=data.table or .AS=data.frame if you prefer. >>>> if(missing(subject)) { >>>> nearestSubjectIndex<-nearest(query,...) >>>> } else { >>>> nearestSubjectIndex<-nearest(query,subject,...) >>>> } >>>> queryHasNearest<-! is.na(nearestSubjectIndex) >>>> queryIndex<-which(queryHasNearest) >>>> queryHavingNearest<-query[queryIndex] >>>> nearestSubjectIndex<-nearestSubjectIndex[queryIndex] >>>> nearestSubject<-subject[nearestSubjectIndex] >>>> d<-distance(queryHavingNearest,nearestSubject) >>>> .AS(query=queryIndex >>>> ,subject=nearestSubjectIndex >>>> ,distance=d) >>>> } >>>> >>>> You've asked so many questions in this forum whose answer I made >>>> use of that I must owe you this tidbit.... >>>> >>>> Lurkers, and fellow travelers, I welcome corrections and >>>> stylistic suggestions. >>>> >>>> Cheers, >>>> >>>> Malcolm Cook >>>> >>>> >>>> ________________________________________ >>>> From: bioconductor-bounces at r-project.org [bioconductor-bounces at r-project.org >>>> ] On Behalf Of Janet Young [jayoung at fhcrc.org] >>>> Sent: Monday, March 26, 2012 4:42 PM >>>> To: bioconductor at r-project.org >>>> Subject: [BioC] distanceToNearest for GRanges? >>>> >>>> Hi there, >>>> >>>> Any plans to implement distanceToNearest for GRanges objects? >>>> That would be really useful for me. >>>> >>>> thanks, >>>> >>>> Janet >>>> >>>> >>>> ------------------------------------------------------------------- >>>> >>>> Dr. Janet Young >>>> >>>> Tapscott and Malik labs >>>> >>>> Fred Hutchinson Cancer Research Center >>>> 1100 Fairview Avenue N., C3-168, >>>> P.O. Box 19024, Seattle, WA 98109-1024, USA. >>>> >>>> tel: (206) 667 1471 fax: (206) 667 6524 >>>> email: jayoung ...at... fhcrc.org >>>> >>>> >>>> ------------------------------------------------------------------- >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at r-project.org >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at r-project.org >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor Michael Muratet, Ph.D. Senior Scientist HudsonAlpha Institute for Biotechnology mmuratet at hudsonalpha.org (256) 327-0473 (p) (256) 327-0966 (f) Room 4005 601 Genome Way Huntsville, Alabama 35806
ADD COMMENT
0
Entering edit mode
On 04/20/2012 07:52 AM, Michael Muratet wrote: > > On Apr 11, 2012, at 11:12 AM, Valerie Obenchain wrote: > >> This has been added to GenomicRanges 1.9.4. You will also need IRanges >> 1.15.2. > Greetings > > I need this functionality, but I only see GenomicRanges version on the > Bioconductor site. I couldn't find it under the Developer links, either. > Is it available and where can I get it? The modification is available in the 'devel' branch; instructions (a little complicated) are available at http://bioconductor.org/developers/useDevel/ Devel packages are summarized at http://bioconductor.org/packages/devel/BiocViews.html where the current GenomicRanges version is 1.9.7. Martin > > Thanks > > Mike > >> >> Valerie >> >> >> On 03/27/2012 10:36 AM, Janet Young wrote: >>> Hi, >>> >>> thank you both - very helpful. >>> >>> Janet >>> >>> >>> >>> On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: >>> >>>> Hi Janet, Malcom, >>>> >>>> Yes, we can add distanceToNearest for GRanges. This will probably >>>> happen after the release (i.e., next week). I'll post back here when >>>> it's complete. >>>> >>>> Valerie >>>> >>>> >>>> On 03/26/12 16:26, Cook, Malcolm wrote: >>>>> Janet, >>>>> >>>>> In the mean time.... >>>>> >>>>> distanceToNearest.GRanges<- function >>>>> (query,subject=query,...,.AS=DataFrame) { >>>>> ## PURPOSE: an implementation of distanceToNearest for GRanges in >>>>> ## terms of 'nearest' and 'distance' whose return value is shaped >>>>> ## like that of IRange's 'nearest', by default, but you can ask for >>>>> ## the result .AS=data.table or .AS=data.frame if you prefer. >>>>> if(missing(subject)) { >>>>> nearestSubjectIndex<-nearest(query,...) >>>>> } else { >>>>> nearestSubjectIndex<-nearest(query,subject,...) >>>>> } >>>>> queryHasNearest<-! is.na(nearestSubjectIndex) >>>>> queryIndex<-which(queryHasNearest) >>>>> queryHavingNearest<-query[queryIndex] >>>>> nearestSubjectIndex<-nearestSubjectIndex[queryIndex] >>>>> nearestSubject<-subject[nearestSubjectIndex] >>>>> d<-distance(queryHavingNearest,nearestSubject) >>>>> .AS(query=queryIndex >>>>> ,subject=nearestSubjectIndex >>>>> ,distance=d) >>>>> } >>>>> >>>>> You've asked so many questions in this forum whose answer I made >>>>> use of that I must owe you this tidbit.... >>>>> >>>>> Lurkers, and fellow travelers, I welcome corrections and stylistic >>>>> suggestions. >>>>> >>>>> Cheers, >>>>> >>>>> Malcolm Cook >>>>> >>>>> >>>>> ________________________________________ >>>>> From: bioconductor-bounces at r-project.org >>>>> [bioconductor-bounces at r-project.org] On Behalf Of Janet Young >>>>> [jayoung at fhcrc.org] >>>>> Sent: Monday, March 26, 2012 4:42 PM >>>>> To: bioconductor at r-project.org >>>>> Subject: [BioC] distanceToNearest for GRanges? >>>>> >>>>> Hi there, >>>>> >>>>> Any plans to implement distanceToNearest for GRanges objects? That >>>>> would be really useful for me. >>>>> >>>>> thanks, >>>>> >>>>> Janet >>>>> >>>>> >>>>> ------------------------------------------------------------------- >>>>> >>>>> Dr. Janet Young >>>>> >>>>> Tapscott and Malik labs >>>>> >>>>> Fred Hutchinson Cancer Research Center >>>>> 1100 Fairview Avenue N., C3-168, >>>>> P.O. Box 19024, Seattle, WA 98109-1024, USA. >>>>> >>>>> tel: (206) 667 1471 fax: (206) 667 6524 >>>>> email: jayoung ...at... fhcrc.org >>>>> >>>>> >>>>> ------------------------------------------------------------------- >>>>> >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at r-project.org >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at r-project.org >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor > > Michael Muratet, Ph.D. > Senior Scientist > HudsonAlpha Institute for Biotechnology > mmuratet at hudsonalpha.org > (256) 327-0473 (p) > (256) 327-0966 (f) > > Room 4005 > 601 Genome Way > Huntsville, Alabama 35806 > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793
ADD REPLY
0
Entering edit mode
I forget to say thank you for this. It's an exceptionally handy feature. thanks, --t On Fri, Apr 20, 2012 at 10:07 AM, Martin Morgan <mtmorgan@fhcrc.org> wrote: > On 04/20/2012 07:52 AM, Michael Muratet wrote: > >> >> On Apr 11, 2012, at 11:12 AM, Valerie Obenchain wrote: >> >> This has been added to GenomicRanges 1.9.4. You will also need IRanges >>> 1.15.2. >>> >> Greetings >> >> I need this functionality, but I only see GenomicRanges version on the >> Bioconductor site. I couldn't find it under the Developer links, either. >> Is it available and where can I get it? >> > > The modification is available in the 'devel' branch; instructions (a > little complicated) are available at > > http://bioconductor.org/**developers/useDevel/<http: bioconductor.o="" rg="" developers="" usedevel=""/> > > Devel packages are summarized at > > http://bioconductor.org/**packages/devel/BiocViews.html<http: bioco="" nductor.org="" packages="" devel="" biocviews.html=""> > > where the current GenomicRanges version is 1.9.7. > > Martin > > > >> Thanks >> >> Mike >> >> >>> Valerie >>> >>> >>> On 03/27/2012 10:36 AM, Janet Young wrote: >>> >>>> Hi, >>>> >>>> thank you both - very helpful. >>>> >>>> Janet >>>> >>>> >>>> >>>> On Mar 27, 2012, at 6:35 AM, Valerie Obenchain wrote: >>>> >>>> Hi Janet, Malcom, >>>>> >>>>> Yes, we can add distanceToNearest for GRanges. This will probably >>>>> happen after the release (i.e., next week). I'll post back here when >>>>> it's complete. >>>>> >>>>> Valerie >>>>> >>>>> >>>>> On 03/26/12 16:26, Cook, Malcolm wrote: >>>>> >>>>>> Janet, >>>>>> >>>>>> In the mean time.... >>>>>> >>>>>> distanceToNearest.GRanges<- function >>>>>> (query,subject=query,...,.AS=**DataFrame) { >>>>>> ## PURPOSE: an implementation of distanceToNearest for GRanges in >>>>>> ## terms of 'nearest' and 'distance' whose return value is shaped >>>>>> ## like that of IRange's 'nearest', by default, but you can ask for >>>>>> ## the result .AS=data.table or .AS=data.frame if you prefer. >>>>>> if(missing(subject)) { >>>>>> nearestSubjectIndex<-nearest(**query,...) >>>>>> } else { >>>>>> nearestSubjectIndex<-nearest(**query,subject,...) >>>>>> } >>>>>> queryHasNearest<-! is.na(nearestSubjectIndex) >>>>>> queryIndex<-which(**queryHasNearest) >>>>>> queryHavingNearest<-query[**queryIndex] >>>>>> nearestSubjectIndex<-**nearestSubjectIndex[**queryIndex] >>>>>> nearestSubject<-subject[**nearestSubjectIndex] >>>>>> d<-distance(**queryHavingNearest,**nearestSubject) >>>>>> .AS(query=queryIndex >>>>>> ,subject=nearestSubjectIndex >>>>>> ,distance=d) >>>>>> } >>>>>> >>>>>> You've asked so many questions in this forum whose answer I made >>>>>> use of that I must owe you this tidbit.... >>>>>> >>>>>> Lurkers, and fellow travelers, I welcome corrections and stylistic >>>>>> suggestions. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Malcolm Cook >>>>>> >>>>>> >>>>>> ______________________________**__________ >>>>>> From: bioconductor-bounces@r-**project.org<bioconductor- bounces@r-project.org=""> >>>>>> [bioconductor-bounces@r-**project.org<bioconductor- bounces@r-project.org="">] >>>>>> On Behalf Of Janet Young >>>>>> [jayoung@fhcrc.org] >>>>>> Sent: Monday, March 26, 2012 4:42 PM >>>>>> To: bioconductor@r-project.org >>>>>> Subject: [BioC] distanceToNearest for GRanges? >>>>>> >>>>>> Hi there, >>>>>> >>>>>> Any plans to implement distanceToNearest for GRanges objects? That >>>>>> would be really useful for me. >>>>>> >>>>>> thanks, >>>>>> >>>>>> Janet >>>>>> >>>>>> >>>>>> ------------------------------**------------------------------** >>>>>> ------- >>>>>> >>>>>> Dr. Janet Young >>>>>> >>>>>> Tapscott and Malik labs >>>>>> >>>>>> Fred Hutchinson Cancer Research Center >>>>>> 1100 Fairview Avenue N., C3-168, >>>>>> P.O. Box 19024, Seattle, WA 98109-1024, USA. >>>>>> >>>>>> tel: (206) 667 1471 fax: (206) 667 6524 >>>>>> email: jayoung ...at... fhcrc.org >>>>>> >>>>>> >>>>>> ------------------------------**------------------------------** >>>>>> ------- >>>>>> >>>>>> ______________________________**_________________ >>>>>> Bioconductor mailing list >>>>>> Bioconductor@r-project.org >>>>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: st="" at.ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>>>> Search the archives: >>>>>> http://news.gmane.org/gmane.**science.biology.informatics.**con ductor<http: news.gmane.org="" gmane.science.biology.informatics.conduct="" or=""> >>>>>> ______________________________**_________________ >>>>>> Bioconductor mailing list >>>>>> Bioconductor@r-project.org >>>>>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: st="" at.ethz.ch="" mailman="" listinfo="" bioconductor=""> >>>>>> Search the archives: >>>>>> http://news.gmane.org/gmane.**science.biology.informatics.**con ductor<http: news.gmane.org="" gmane.science.biology.informatics.conduct="" or=""> >>>>>> >>>>> >>> ______________________________**_________________ >>> Bioconductor mailing list >>> Bioconductor@r-project.org >>> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.="" ethz.ch="" mailman="" listinfo="" bioconductor=""> >>> Search the archives: >>> http://news.gmane.org/gmane.**science.biology.informatics.**conduc tor<http: news.gmane.org="" gmane.science.biology.informatics.conductor=""> >>> >> >> Michael Muratet, Ph.D. >> Senior Scientist >> HudsonAlpha Institute for Biotechnology >> mmuratet@hudsonalpha.org >> (256) 327-0473 (p) >> (256) 327-0966 (f) >> >> Room 4005 >> 601 Genome Way >> Huntsville, Alabama 35806 >> >> ______________________________**_________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.ch="" mailman="" listinfo="" bioconductor=""> >> Search the archives: >> http://news.gmane.org/gmane.**science.biology.informatics.**conduct or<http: news.gmane.org="" gmane.science.biology.informatics.conductor=""> >> > > > -- > Computational Biology > > Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 > > Location: M1-B861 > Telephone: 206 667-2793 > > > ______________________________**_________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.et="" hz.ch="" mailman="" listinfo="" bioconductor=""> > Search the archives: http://news.gmane.org/gmane.** > science.biology.informatics.**conductor<http: news.gmane.org="" gmane.="" science.biology.informatics.conductor=""> > -- *A model is a lie that helps you see the truth.* * * Howard Skipper<http: cancerres.aacrjournals.org="" content="" 31="" 9="" 1173.full.pdf=""> [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 948 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