Re: [Bioc-devel] Efficient Random Sampling of Positions in GRanges

2016-02-16 Thread Hervé Pagès
Hi Dario, On 02/16/2016 03:00 AM, Dario Strbenac wrote: Hello, There is no convenience function to sample nucleotide positions from a GRanges object. My approach is to generate a GRanges of every chromosomal position with a width of 1, then find the overlaps with the desired ranges (admissibl

Re: [Bioc-devel] Strand-Awareness for Restrict Function

2016-02-16 Thread Hervé Pagès
Hi Kasper, On 02/16/2016 07:05 AM, Kasper Daniel Hansen wrote: upstream / downstream is what we have previously used for strand awareness. These names are good for specifying *relative* positions in a way that is strand-aware. In the case of restrict() though, where we need to be able to speci

Re: [Bioc-devel] Efficient Random Sampling of Positions in GRanges

2016-02-16 Thread Bernat Gel
Hi Dario, You could use a package called regioneR for that. It has functions to create random regions and to randomize existing sets of regions along the genome and it can do it taking into account a possible set of masked regions. In your case, you could create a mask for the genome that is

Re: [Bioc-devel] BiocGenerics attaches when methods package is imported

2016-02-16 Thread Dan Tenenbaum
I have answered your email in the tracker, twice. Please do not reply all to random threads on bioc-devel. On February 16, 2016 8:41:25 AM PST, Yuande Tan wrote: >Dear all: >Today I resubmit the revised version of MBttest with fix error >occurring in >building windows. Right now I received mes

Re: [Bioc-devel] BiocGenerics attaches when methods package is imported

2016-02-16 Thread Yuande Tan
Dear all: Today I resubmit the revised version of MBttest with fix error occurring in building windows. Right now I received message from SinglePackageBuilder BioC-Submit. It said one or more warnings in build. I checked the History Biocond Single Builder, the warnings list in morelia and moscato2

Re: [Bioc-devel] Strand-Awareness for Restrict Function

2016-02-16 Thread Kasper Daniel Hansen
upstream / downstream is what we have previously used for strand awareness. Kasper On Tue, Feb 16, 2016 at 3:41 AM, Hervé Pagès wrote: > Hi Dario, > > AFAIK the 'start' and 'end' are strand-independent concepts so it > wouldn't be a good idea to let the user specify a strand-specific > window t

Re: [Bioc-devel] BiocGenerics attaches when methods package is imported

2016-02-16 Thread Andreas Kapouranis
Hi Michael, Thanks for the suggestion. When I depend my package on GenomicRanges the warning is now gone. Regards, Andreas -- Chantriolnt - Andreas Kapourani PhD Candidate in Data Science, School of Informatics, University of Edinburgh e-m

[Bioc-devel] Efficient Random Sampling of Positions in GRanges

2016-02-16 Thread Dario Strbenac
Hello, There is no convenience function to sample nucleotide positions from a GRanges object. My approach is to generate a GRanges of every chromosomal position with a width of 1, then find the overlaps with the desired ranges (admissible regions), then sample the positions that overlapped. The

Re: [Bioc-devel] Strand-Awareness for Restrict Function

2016-02-16 Thread Hervé Pagès
Hi Dario, AFAIK the 'start' and 'end' are strand-independent concepts so it wouldn't be a good idea to let the user specify a strand-specific window thru these arguments. That means a strand-aware restrict() would need to have 2 additional arguments. But how should we name them? My preference wo