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

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

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.

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

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

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

[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.

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