Re: [R-pkg-devel] Warning of DDRTree

2017-04-13 Thread Dirk Eddelbuettel

On 14 April 2017 at 01:49, Xiaojie Qiu wrote:
| We are planning to update the DDRTree package but found the following
| warnings:
| 
|   
d:/RCompile/CRANpkg/lib/3.4/BH/include/boost/unordered/detail/buckets.hpp:586:29:
| warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
|   
d:/RCompile/CRANpkg/lib/3.4/BH/include/boost/unordered/detail/buckets.hpp:591:38:
| warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
| 
|  Those warnings seem to relate to boost but not to our package. Can anyone
| have some idea on how to fix this?

Yes. Compile the program as a C++11 program.

My favourite way of saying that is via

   CXX_STD = CXX11

in src/Makevars. Now that all core systems (Win, OS X, Linux) used with R
have proper C++11 compiler support this is no longer an issue.

[ The underlying issue is boring. The powers that be decided a long time ago
that only C++98 was real C++ in the context of R. And that old standard has
no 'long long', hence the issue. Ironically, intermediate standards added
long long but we were not aloud to play with it because someone else knew
what's best for us. Luckily this is a thing of the past. ]

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Warning of DDRTree

2017-04-13 Thread Kevin Ushey
You can try placing this in your src/Makevars[.win] file:

CXXFLAGS = -DBOOST_NO_LONG_LONG

The dplyr package does this (and more) to avoid 'long long' leaking in
from Boost headers. See e.g.

https://github.com/tidyverse/dplyr/blob/ff719f53f88f2f03a298fa0ea489b902527ee2f1/src/Makevars#L2

The other alternative would be to just enforce the use of C++11 in
your package, by adding e.g.

SystemRequirements: C++11

to your DESCRIPTION file, or

CXX_STD = CXX11

to your src/Makevars[.win]. See
https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b11-code
for more information.

Best,
Kevin

On Thu, Apr 13, 2017 at 6:49 PM, Xiaojie Qiu  wrote:
>
> We are planning to update the DDRTree package but found the following
> warnings:
>
>   
> d:/RCompile/CRANpkg/lib/3.4/BH/include/boost/unordered/detail/buckets.hpp:586:29:
> warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
>   
> d:/RCompile/CRANpkg/lib/3.4/BH/include/boost/unordered/detail/buckets.hpp:591:38:
> warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
>
>  Those warnings seem to relate to boost but not to our package. Can anyone
> have some idea on how to fix this?
> The check log is here:
> https://win-builder.r-project.org/incoming_pretest/170414_025235_DDRTree_015/00check.log
> The windows install log is here:
> https://win-builder.r-project.org/incoming_pretest/170414_025235_DDRTree_015/00install.out
>
> Thanks in advance!
>
> Best,
> Xiaojie
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Warning of DDRTree

2017-04-13 Thread Xiaojie Qiu
We are planning to update the DDRTree package but found the following
warnings:

  
d:/RCompile/CRANpkg/lib/3.4/BH/include/boost/unordered/detail/buckets.hpp:586:29:
warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
  
d:/RCompile/CRANpkg/lib/3.4/BH/include/boost/unordered/detail/buckets.hpp:591:38:
warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]

 Those warnings seem to relate to boost but not to our package. Can anyone
have some idea on how to fix this?
The check log is here:
https://win-builder.r-project.org/incoming_pretest/170414_025235_DDRTree_015/00check.log
The windows install log is here:
https://win-builder.r-project.org/incoming_pretest/170414_025235_DDRTree_015/00install.out

Thanks in advance!

Best,
Xiaojie

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Package Submission: issues with R_registerRoutines', 'R_useDynamicSymbols'

2017-04-13 Thread Tim Keitt
On Thu, Apr 13, 2017 at 10:14 AM, Vineetha Warriyar Kodalore Vijayan <
vineethawarriyar@ucalgary.ca> wrote:

> Can someone help to resolve this issue?


I wrote a short R script that will read your RcppExports.cpp and emit the
corresponding init.c file. I call it from my configure script, but if your
code does not change, then you can just call it once (in your package
directory) and be done with it.

The R script is here:
https://github.com/thk686/rpg/blob/master/src/gen_init_c.R

THK

http://www.keittlab.org/

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Package Submission: issues with R_registerRoutines', 'R_useDynamicSymbols'

2017-04-13 Thread Vineetha Warriyar Kodalore Vijayan
Thanks everyone!


-Vineetha


From: Ege Rubak 
Sent: Thursday, April 13, 2017 11:04:20 AM
To: Zhian Kamvar; Vineetha Warriyar Kodalore Vijayan
Cc: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] Package Submission: issues with R_registerRoutines', 
'R_useDynamicSymbols'

Hi,

A few extra comments are below.

On 04/14/2017 12:46 AM, Zhian Kamvar wrote:
> Hi,
>
>> On Apr 13, 2017, at 11:41 , Vineetha Warriyar Kodalore Vijayan
>> > > wrote:
>>
>> Hi Ege,
>>
>>
>> Thank you!
>>
>> In the init.c file,  do I have to change 'void' to corresponding
>> declaration?
>>
>> E.g:
>>
>> extern void F77_NAME(datacon)(void *, void *, void *, void *, void *,
>> void *, void *, void *, void *, void *, void *);
>>
I don't think you need to change anything in the generated file. At
least I didn't, and I believe Brian Ripley mentioned that the script
generated fully working init files for hundreds or thousands of packages
with compiled code and only needed manual changes for tens of packages
when they tested it on CRAN.
>>
>> Also, how do I know the package passes the CRAN incoming feasibility
>> as it does not show any warnings or notes on my R CMD CHECK --as-cran.
>> Re submit and see again?
>>
>
> You can use R-Hub as a way to check your package on the development
> version: https://github.com/r-hub/rhub#readme If you have your package
> on a public remote git repository, you can additionally set up a
> continuous integration service like
> travis-ci: https://docs.travis-ci.com/user/languages/r/ and use that to
> check against devel.
>
I agree that R-Hub is a great solution, and I have used it several times
myself. You can even just use the website to submit a package:
https://builder.r-hub.io/advanced
But the R interface is nice, so it is recommendable to install the rhub
package.
Alternatively, submitting to http://win-builder.r-project.org/ also lets
you test under R-devel.

Best,
Ege

> Best,
> Zhian
>
>>
>> Regards,
>>
>> Vineetha Warriyar
>>
>> 
>> From: R-package-devel > > on behalf of Ege Rubak
>> >
>> Sent: Thursday, April 13, 2017 9:35:36 AM
>> To: r-package-devel@r-project.org 
>> Subject: Re: [R-pkg-devel] Package Submission: issues with
>> R_registerRoutines', 'R_useDynamicSymbols'
>>
>> Hi,
>>
>> This is something that has gotten quite a bit of attention recently due
>> to the coming R 3.4 giving a NOTE when routines aren't declared. You
>> should be able to find info on this list or elsewhere.
>> Basically you need to make a file called e.g. init.c in your src/ with
>> the appropriate code. This file can be auto-generated for you as
>> described by Dirk here:
>> http://dirk.eddelbuettel.com/blog/2017/03/30/#002_even_easier_package_registration
>>
>> Good luck!
>>
>> Ege
>>
>> On 04/13/2017 11:14 PM, Vineetha Warriyar Kodalore Vijayan wrote:
>>>
>>> Hi,
>>>
>>>
>>> When I submitted my R package to CRAN, it didn't go through the
>>> automatic incoming check, resulting the following NOTE.  I tested on
>>> my macOS with R CMD CHECK and R CMD --as-cran, both went through with
>>> one NOTE ( Maintainer: NOTE).
>>>
>>> * checking compiled code ... NOTE
>>> File 'EpiILM/libs/i386/EpiILM.dll':
>>>  Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
>>> File 'EpiILM/libs/x64/EpiILM.dll':
>>>  Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
>>>
>>> It is good practice to register native routines and to disable symbol
>>> search.
>>>
>>> See 'Writing portable packages' in the 'Writing R Extensions' manual.
>>>
>>> I did go through the manual (section 5.4), but didn't understand
>>> much. Can someone help to resolve this issue?
>>>
>>>
>>> Thanks,
>>>
>>> Vineetha
>>>
>>>
>>>   [[alternative HTML version deleted]]
>>>
>>> __
>>> R-package-devel@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>>
>>
>> __
>> R-package-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-package-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Package Submission: issues with R_registerRoutines', 'R_useDynamicSymbols'

2017-04-13 Thread Vineetha Warriyar Kodalore Vijayan
Hi Ege,


Thank you!

In the init.c file,  do I have to change 'void' to corresponding declaration?

E.g:

extern void F77_NAME(datacon)(void *, void *, void *, void *, void *, void *, 
void *, void *, void *, void *, void *);


Also, how do I know the package passes the CRAN incoming feasibility as it does 
not show any warnings or notes on my R CMD CHECK --as-cran. Re submit and see 
again?


Regards,

Vineetha Warriyar


From: R-package-devel  on behalf of Ege 
Rubak 
Sent: Thursday, April 13, 2017 9:35:36 AM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] Package Submission: issues with R_registerRoutines', 
'R_useDynamicSymbols'

Hi,

This is something that has gotten quite a bit of attention recently due
to the coming R 3.4 giving a NOTE when routines aren't declared. You
should be able to find info on this list or elsewhere.
Basically you need to make a file called e.g. init.c in your src/ with
the appropriate code. This file can be auto-generated for you as
described by Dirk here:
http://dirk.eddelbuettel.com/blog/2017/03/30/#002_even_easier_package_registration

Good luck!

Ege

On 04/13/2017 11:14 PM, Vineetha Warriyar Kodalore Vijayan wrote:
>
> Hi,
>
>
> When I submitted my R package to CRAN, it didn't go through the automatic 
> incoming check, resulting the following NOTE.  I tested on my macOS with R 
> CMD CHECK and R CMD --as-cran, both went through with one NOTE ( Maintainer: 
> NOTE).
>
> * checking compiled code ... NOTE
> File 'EpiILM/libs/i386/EpiILM.dll':
>   Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
> File 'EpiILM/libs/x64/EpiILM.dll':
>   Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
>
> It is good practice to register native routines and to disable symbol
> search.
>
> See 'Writing portable packages' in the 'Writing R Extensions' manual.
>
> I did go through the manual (section 5.4), but didn't understand much. Can 
> someone help to resolve this issue?
>
>
> Thanks,
>
> Vineetha
>
>
>[[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Package Submission: issues with R_registerRoutines', 'R_useDynamicSymbols'

2017-04-13 Thread Vineetha Warriyar Kodalore Vijayan

Hi,


When I submitted my R package to CRAN, it didn't go through the automatic 
incoming check, resulting the following NOTE.  I tested on my macOS with R CMD 
CHECK and R CMD --as-cran, both went through with one NOTE ( Maintainer: NOTE).

* checking compiled code ... NOTE
File 'EpiILM/libs/i386/EpiILM.dll':
  Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
File 'EpiILM/libs/x64/EpiILM.dll':
  Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'

It is good practice to register native routines and to disable symbol
search.

See 'Writing portable packages' in the 'Writing R Extensions' manual.

I did go through the manual (section 5.4), but didn't understand much. Can 
someone help to resolve this issue?


Thanks,

Vineetha


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [Rd] "table(droplevels(aq)$Month)" in manual page of droplevels

2017-04-13 Thread Martin Maechler
> Rui Barradas 
> on Wed, 12 Apr 2017 17:07:45 +0100 writes:

> Hello, Inline.

> Em 12-04-2017 16:40, Henric Winell escreveu:
>> (Let's keep the discussion on-list -- I've added back
>> R-devel.)
>> 
>> On 2017-04-12 16:39, Ulrich Windl wrote:
>> 
> Henric Winell  schrieb am
>> 12.04.2017
> um 15:35 in
>>> Nachricht
>>> :
 On 2017-04-12 14:40, Ulrich Windl wrote:
 
> The last line of the example in droplevels' manual
> page seems to be incorrect to me. I think it should
> read: "table(droplevels(aq$Month))". Amazingly (I
> don't understand) both variants seem to produce the
> same result (R 3.3.3): ---
 
 The manual says that "The function 'droplevels' is used
 to drop unused levels from a 'factor' or, more
 commonly, from factors in a data frame." and, as
 documented, the 'droplevels' generic has methods for
 objects of class "data.frame" and "factor".  So, your
 being amazed is a bit surprising given that 'aq' is a
 data frame.
>>> 
>>> The "surprising" thing is the syntax: I was unaware that
>>> '$' is a generic operator that can be applied to the
>>> result of a function (i.e.: droplevels); I thought it's
>>> kind of a special variable syntax.
>> 
>> Then your surprise is unrelated to the use of
>> 'droplevels'.
>> 
>> Since the 'droplevels' method for objects of class
>> "data.frame" returns a data frame, the extraction
>> operator '$' works directly on the resulting object.  So,
>> 'droplevels(aq)$Month' is essentially the same as
>> 
>> aq <- droplevels(aq) aq$Month
>> 
>> > Isn't there also the syntax
>> ``droplevels(aq)["Month"]''?
>> 
>> Sure, and there are even more ways to do subsetting.  But
>> this is basic stuff and therefore off-topic for R-devel.
>> Please see the manual (?Extract) or, e.g., Chapter 3 of
>> Hadley Wickham's "Advanced R".

> But note that droplevels(aq)["Month"] and
> droplevels(aq)$Month are _not_ the same. The first returns
> a data.frame (with just one vector), the latter returns a
> vector. To return just a vector you could also use

> droplevels(aq)[["Month"]]

> which is preferable for programming, by the way. The '$'
> operator should be reserved for interactive use only.

> Hope this helps,

Indeed, we hope..  Thanks to the helpers!

Ulrich, please note that in the end this was all  because you're
still learning to understand R (e.g., data frames !) better.

As such this was completely inappropriate for R-devel and should
have gotten to the R help list  R-help.

With regards,
Martin Maechler, ETH Zurich

> Rui Barradas
>> 
>> 
>> Henric Winell
>>> 
>>> Regards, Ulrich
>>> 
 
 
 Henric Winell
 
 
 
> aq <- transform(airquality, Month = factor(Month, labels =
> month.abb[5:9])) aq <- subset(aq, Month != "Jul")
> table(aq$Month)
> 
> May Jun Jul Aug Sep 31 30 0 31 30
> table(droplevels(aq)$Month)
> 
> May Jun Aug Sep 31 30 31 30
> table(droplevels(aq$Month))
> 
> May Jun Aug Sep 31 30 31 30
>> 
> --- For the sake of learners, try to keep the examples
> simple and useful, even though you experts want to
> impress the newbees...
> 
> Ulrich
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel

> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Bioc-devel] R CMD check error on shinytest package

2017-04-13 Thread Obenchain, Valerie
Hi Sam,

Yes, this is a problem. Packages you depend on must be in a CRAN or
Bioconductor repository.

Valerie


On 04/12/2017 10:33 PM, Samuel Wieczorek wrote:
> Hi
>
> For the Prostar package, I began to use the funtionnalities of shinytest 
> wich is a package that provides utilities to automatically test shiny apps.
>
> Unfortunately, this package is not available neither on CRAN or 
> Bioconductor (it is available on github 
> https://github.com/rstudio/shinytest).
>
> Thus, I had a an error on all platforms at the CHECK step.Will it be a 
> problem to pass the tests and be in the next release ?
>
>
> Thanks
>
>
> Sam
>
>
>



This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


Re: [Bioc-devel] Commiting from git to svn

2017-04-13 Thread Lluís Revilla
Dear Stephanie,

Maybe I didn't pick the right commit but it didn't solve my error, and
the same message appeared.
Thanks for the suggestion.

Lluís

On 6 April 2017 at 18:34, Stephanie M. Gogarten
 wrote:
> Try following the steps under "Dealing with prior history / merge conflicts"
> on the git mirror page:
> http://www.bioconductor.org/developers/how-to/git-mirrors/
>
> Using "git cherry-pick" instead of rebase seems to avoid a lot of errors.
>
> Stephanie
>
>
> On 4/5/17 8:18 AM, Lluís Revilla wrote:
>>
>> Dear all,
>>
>> Short problem: I am a trying to sync my new package BioCor git repository
>> with the Bioconductor svn repository. But I am failing when I do git svn
>> dcommit.
>>
>> Long history of the problem
>> I did some changes on my master branch (where I developed until now) then
>> I
>> used the update_remotes.sh which created a new branch.
>> I changed to that branch (git checkout devel), changed its name (git
>> branch
>> -m devel bioc/devel) and used (git svn rebase) following the instructions.
>> I brought the changes by merging the branches (git merge master)and wanted
>> to push it to the svn server with (git svn dcommit --add-author-from) .
>> As expected I had some merge conflicts (apparently originated because the
>> initial commit to that repository wasn't with the code I submitted)
>> I skipped them (git rebase --skip) until it ended the rebase at the moment
>> I am only with the changes I performed after submitting the package, as
>> compared with the Bioconductor-mirror (previously the branch was ahead of
>> 'bioc/master' by 173 commits):
>> git status
>> Your branch is ahead of 'bioc/master' by 11 commits.
>>
>> However when I try to sync and commit with svn I can't (BTW it wasn't
>> clear
>> to me how to add my username for git svn repository otherwise I am
>> prompted
>> with tue username of my machine, so maybe it is still wrong):
>>
>> git svn dcommit --add-author-from --username l.revilla
>>
>> Authentication realm:  The bioconductor
>> Subversion Repository
>> Password for 'l.revilla':
>>
>> ERROR from SVN:
>> URL access forbidden for unknown reason: POST of '/bioconductor/!svn/me':
>> 403 Forbidden (https://hedgehog.fhcrc.org)
>> W: 3d12099bda0c61d0a63a787ebb9cbe3b2e06770d and refs/remotes/svn differ,
>> using rebase:
>> :04 04 985b6b2986a31a3eff4161563a5585ea10467787
>> c8d818d0ed3196d391f914996dd26354004df665 MR
>> :100644 00 8e2bef6bf185b9bbc9da7e500bdb394396ccad99
>>  Dbio_cor.R
>> :04 04 ed161436ea9089f70f74f2e1ea79e53a796eed5b
>> 378a5b97d68ecfa7430bebdaba2c5b6540e6051e Mman
>> :04 04 65b109ed754cd8aa35a2fcaceea8c05fdbe91899
>> 594d15d7838d2096afda7b5697242e48bb7fce42 Mtests
>> :04 04 474a6a48c23f1bce377071b58e0b87f161b2a5cf
>> 6be3cd535391595a962f610dad103e88b2fc32bd Mvignettes
>> Current branch bioc/devel is up to date.
>> ERROR: Not all changes have been committed into SVN, however the committed
>> ones (if any) seem to be successfully integrated into the working tree.
>> Please see the above messages for details.
>>
>>
>> How can I push the new commits to the svn repository?
>>
>> Many thanks!
>>
>> Lluís
>>
>> [[alternative HTML version deleted]]
>>
>> ___
>> Bioc-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel

[Rd] Q: Windows/readline: missing history search

2017-04-13 Thread Ulrich Windl
Hello!

Ever since I used R on Windows (RGui) I am missing the ability to search the 
command history (Cntrl+R (reverse-search-history) in BASH, for example). Is 
there a particular reason for having this function disabled? Another feature 
would be word-wise delete (kill-word, backward-kill-word).

Probably being able to use the Alt-key as Meta key for readline (instead of 
activating menu entries) would be helpful. At least of the console window has 
the input focus.

Another nice feature would be PuTTY-like copying of selected text: It's 
sufficient to mark text in the console to have it put into the clipboard. In 
Rgui I need an explicit copy.

Finally I'd like if Rgui would remember the state of the MDI main window 
(maximized or not, maybe position and size also): Currently it always starts 
maximized.

Regards,
Ulrich

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Bioc-devel] Iterating over BSgenomeViews returns DNAString instead of BSgenomeViews

2017-04-13 Thread Michael Lawrence
You could eventually point your student to MaskedXString and
oligonucleotideFrequency(). You can mask the repeats and then just run
the latter to count the N-mers. Comparing their original code to the
code based on existing high-level utilities might be a useful
exercise.

Michael


On Wed, Apr 12, 2017 at 8:24 PM, Pariksheet Nanda
 wrote:
> On Fri, Apr 7, 2017 at 1:13 AM, Hervé Pagès  wrote:
>>
>> This is the expected behavior.
>>
>> Some background: BSgenomeViews are list-like objects where the *list
>> elements* (i.e. the elements one extracts with [[) are the DNA
>> sequences from the views
> --snip--
>> The important difference is that with [[ I get a DNAString object
>> (the content of the view) and with [ I get a BSgenomeViews object
>> of length 1.
>
> Thank you, Hervé!
>
> I was failing to make the connection with the `[[` accessor.
>
>
> On Fri, Apr 7, 2017 at 1:16 AM, Michael Lawrence 
> wrote:
>>
>> I'm curious as to why you are looping over the views in the first
>> place. Maybe we could arrive at a vectorized solution, which is often
>> but not always simpler and faster.
>
> Hi Michael!
>
> Broad background is I'm acculturating an undergraduate student to writing a
> bioconductor package and applying software engineering practices of version
> control, unit testing, documenting, dependency setup and validation in a
> different environment on our university HPC cluster, etc.  The student also
> came along to LibrePlanet to better understand the culture of software
> freedom :o)  The package goal is to use Biostrings to look for repeating
> DNA sequences of a fixed kmer size and subset to portions of the genome
> without repeats (an aligner can do this ofc, but the goal is to teach R and
> engineering practices).
>
> I appreciate your thoughtfulness for vectorizing the code to best use
> BSgenomeViews, but please don't spend more than 10 minutes as I have to
> balance changes to the code with the student's learning and coding "voice"
> and may not do proper justice for more of your effort.  My slowness to
> reply was getting the project further along to be more understandable.
> Here was the line which I've updating as Hervé suggested to use seq_along():
> https://github.com/coregenomics/kmap/blob/4adaed6b8007e8ea39f39ff57a42a821445d3d46/R/BiostringsProjectNEW.R#L185
> (I'm having a hard time thinking of how to summarizing a small example out
> of context).
> Although in that line ranges_hits() is only operating on single indices,
> ranges_hits() was written to process groups of indices to reduce
> multi-processor communication.  Generating such sets of indices would
> involve applying width() to the views inside mappable() to break in into
> chunks of, say, a million bases for matchPDict().  Again, I'm linking to
> the code for anything that stands out at you, but I will feel bad if you
> spend a lot of time on it.
>
>
>> H.
>
>> Michael
>
> Pariksheet
>
> [[alternative HTML version deleted]]
>
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel